Please sign in to comment.
Move the hidden :id field logic to where it belongs to
When dealing with nested forms, Rails automatically generates a hidden field with the id value of the current object being generated by fields_for. This logic was inside the method that's available from the template object, but we just need it when really dealing with nested attributes, so moving the code to here makes more sense.
- Loading branch information...
Showing with 9 additions and 6 deletions.