Closed iatfrepo closed 1 year ago
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:
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.
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:
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!
Hi Lorin great job as always! Thanks.
Hi Lorin I managed to setup a Ruby app on the Northwind db with Brick and ActiveAdmin. Everything runs fine but after I customized a little models and resources I got this strange issue. If I go to Orders in AA all is fine (see attachment#1) then if I click on the 'brick' icon I get an error (see attachment#2). I also attach a zip with models and resources.
Thank you Sergio La Marca
admin.zip