undefined method `associative?' for nil:NilClass
Created by: dmc2015
-
What were you trying to do? Render show page in administrate dashboard
-
What did you end up with (logs, or, even better, example apps are great!)?
Showing /app_path/app/views/fields/has_many/_show.html.erb where line #21 raised:
undefined method `associative?' for nil:NilClass
I've check the associations between the model, dashboards and associated models and it looks right to me.
In the rails debugger the field
looks like:
=> #<Administrate::Field::HasMany:0x00007fc3991eadc0 @attribute=:coates, @data=#<ActiveRecord::Associations::CollectionProxy [#<Coat id: 229, title: "brown jacket", description: ".".....
>>
I am guessing there is an issue between coat
and my dashboard model but it looks ok to me.
The error isn't very helpful.
- What versions are you running?
- Rails
- rails (>= 5.2.1)
- administrate
- administrate (0.14.0)
- Rails