Closed RailsCod3rFuture closed 3 years ago
Can you share the whole form?
My best guess is that you might be using nested attributes (because of info_attributes
there), and your f.input :city
is actually referencing the main form and not the fields_for
nested piece.
Hi @RailsCod3rFuture 👋🏻
Please let us know if you are still facing this issue and provide the info requested above if so. Closing this issue for the time being :)
Greetings, I'm having an issue where inputs are saving outside of the hash for the object.
<%= f.input :city, input_html: {name: 'new_city'} %>
Server logs
Parameters: {"form_object" => {"info_attributes"=> {.....}}}, "city" => "new york"
Does not save whatsoever.
Expected behavior: input value is saved when form is saved
Actual behavior: Input value is saved outside of form object as single attributes and don't save to the model
Does anyone know why this is happening?