Giter VIP home page Giter VIP logo

Comments (3)

iatfrepo avatar iatfrepo commented on June 27, 2024 1

Hi Lorin great job as always! Thanks.

from brick.

lorint avatar lorint commented on June 27, 2024

Oh interesting! If descrips ends up nil then on line 98 right before this it may write out to the terminal:

Caught it in the act for obj / status_id

or something similar. Would be great to see if that's showing up in the terminal.

Have added the orders_status, orders_tax_status, and inventory_transactions tables to a Northwind database and set up the models like you have, and so far mine is working:
Screenshot 2023-05-04 at 16 08 57

Because the word "status" is one of those that pluralises weirdly, I did try setting up an entry in the inflections.rb file to see if that might be part of it:

# config/initializers/inflections.rb
ActiveSupport::Inflector.inflections(:en) do |inflect|
  inflect.uncountable %w(orders_status orders_tax_status)
end

Ended up with a kinda similar error as to what you describe when rendering orders. Looking into pluralisation and such a bit further now.

from brick.

lorint avatar lorint commented on June 27, 2024

Heya @iatfrepo -- looks this overly-ambitious set of code designed to set @_brick_model when it is nil was preventing a couple of admin panels from working:

# Had tried: (model_name = (@_brick_model || set_brick_model(args, @_brick_req_params))&.name) || ...
# ... but this caused ActiveAdmin and Avo not to function.

Have dialed this back (thankfully it was never a part of a release, only here in the unreleased code), and also added a little more resilience to #brick_grid so that in the event the belongs_to descriptions are absent, it keeps going instead of having the error surface that you have seen. This has made its way into release 1.0.137 of the gem. To update an existing Rails project, you can run bundle update brick and it should pull this newer version and put it into your Gemfile.lock.

Thanks for your contribution!

from brick.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.