You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running into the new_record?/nil class issue described in the readme.
undefined method `new_record?' for nil:NilClass
is_dynamic = f.object.new_record?
^^^^^^^^^^^^
I have my models listed in a namespace, and had to apply this fix to get them to work with Administrate. For nested_has_many, the Administrate fix wasn't enough and I had to also add the class_name to the field options:
Not sure what you are asking. Do you mean which of the two of :country_tax_note and :tax_state is failing? If that's what you mean, perhaps you could use the gem web-console to get a debugging console in the error message page.
With the gem in your Gemfile, start the dev server and trigger the error. Then, on the backtrace list, click on the entry that may look interesting (I just tried forcing the error and for me it was .../app/views/fields/nested_has_many/_fields.html.erb:8). Now you can use the web console to see the variable values at that point. For me I could enter field and it told me which field had the problem:
I was running into the new_record?/nil class issue described in the readme.
I have my models listed in a namespace, and had to apply this fix to get them to work with Administrate. For
nested_has_many
, the Administrate fix wasn't enough and I had to also add theclass_name
to the field options:I tried adding the appropriate
accepts_nested_attributes_for
lines in myColaCom::TaxCountry
modelbut I still get this error. Is there any way to debug exactly which nested attribute I'm missing?
The text was updated successfully, but these errors were encountered: