-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nested attributes / nested form and draper followup #92
Comments
It seems like this bug is not related to When using draper,
I added some debug calls for the method
This means the call to association = [association] if @object.send(association_name).is_a?(Array) in line 1403 fails. |
Is this still an issue now that that pull request has been merged in? |
No. Thanks for merging! |
w00t! |
I have an issue which is related to #52.
I use in my forms Ryan Bates' nested_form gem. It allows to add and remove new fields with JavaScript.
When I start to use draper, the generated html changes.
Namely the name hash of the field misses one level.
Before draper:
Submit results in the following parameters:
phones_attributes[0]
is an existing and already saved record. The HTML for this one is also correct when using draper.phones_attributes[new_1323093036345]
is the new record, created by clicking "Add phone number" and the related JS.With
draper
, I get the following HTML.Submit results in the following parameters:
Current findings
I think nested_form calls the model attributes at https://github.com/ryanb/nested_form/blob/master/lib/nested_form/builder_mixin.rb in a way how draper does not like it.
The text was updated successfully, but these errors were encountered: