I have a child model which accepts_nested_attributes_for another model in a has_one / belongs_to relationship. I am trying to configure the activescaffold controller like this:
config.create.columns = [:name, :birthdate, :device_attributes]
But it just throws this error:
undefined method `device_attributes' for #<Child:0xc103e28>
Note: I have overridden the default create_form with a custom implementation.
I found a way to make it works. I just added this to the activescaffold controller:
It’s not the cleaner way to do it, but i didn’t find other way.