I'm sure the answer to this is out there, but I can't seem to find it. So, I apologize in advance.
I had a perfectly functioning very basic Active Admin interface managing a handful of simple models.
Then, I went to add a couple of models that have has_many relationships and broke most of the pages.
AA now throws:
undefined method `captures' for nil:NilClass
when visiting the Sports tab created by:
rails g active_admin:resource sport
The model I tried to add is:
class Sport < ActiveRecord::Base
attr_accessible :name
has_many :matches
accepts_nested_attributes_for :matches
end
My AA sport.rb is empty:
ActiveAdmin.register Sport do
end
[Edit]
For what it's worth, I've discovered that the problem is in the filters panel of the index page in AA. If I disable filters with the code below, everything works fine.
ActiveAdmin.register Sport do
config.filters = false
end
Is there anything obviously wrong? I can post the stack trace and other model definitions if needed.
Thanks!
Greg