activeadmin: undefined method `chain' for nil:NilClass
ActiveAdmin is throwing an error only for one particular model in my application.
There is nothing in the AA file really…
ActiveAdmin.register Parent do
index do
column :id
actions
end
end
All other admin pages are working.
Thoughts?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 21 (3 by maintainers)
@rabnawazPikesSoft @timoschilling i’ve faced with same issue my models have a deep nesting example:
and i got same error when filters was on error looks like
this error raise in activerecord gem (using activerecord 4.2.6) https://github.com/rails/rails/blob/v4.2.6/activerecord/lib/active_record/reflection.rb#L707-L715
after some research i figure out that this error appear when active_record can automatically infer name for nested association. workaround to handle with this:
After that all works fine with filters. Hope it helps cheers. PS In activerecord 5 chain method was changed maybe this workaround no need anymore for rails 5/activerecord 5