complex-form-examples
complex-form-examples copied to clipboard
Unabled to move the partial to a shared location
I am using add_child_link()
in several places around my project to add a common "address" partial, however when I try to move it to a central location (/app/views/shared/_address.erb) I get the following error:
You have a nil object when you didn't expect it! The error occurred while evaluating nil.klass
I tried to something like add_child_link "Add an address", f, :options => { :partial => "shared/address" }
but it didn't help.
What is the recommended way to use this with partials that have a different path or name?
The add child link method does not take an options hash, so I should probably adjust this so it does. Thanks for the suggestion.