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
When I'm creating a object with a nested object via nested_form_fields everything works well.
When I go to edit but don't change my inputs, a new and identical nested object is created.
Rails 5.0.1, Ruby 2.3.1, Mongoid 6.1.0
The text was updated successfully, but these errors were encountered:
My guess is you didn't allow the id of the nested elements in permitted parameters. You might also need to add a hidden id field in the nested forms. It should all work fine then. If no id is submitted or the id is not a permitted parameter, rails thinks the submitted object is a new record.
When I'm creating a object with a nested object via nested_form_fields everything works well.
When I go to edit but don't change my inputs, a new and identical nested object is created.
Rails 5.0.1, Ruby 2.3.1, Mongoid 6.1.0
The text was updated successfully, but these errors were encountered: