Skip to content

Editing form creates additional record instead of updating existing one #26

@asok

Description

@asok

When someone wants to edit existing user in the test application and clicks ok, the new task is created and added to tasks instead of updating existing ones. The reason of this is hash parameters passed to controller from view:
{"commit"=>"ok", "authenticity_token"=>"ISoWFJusyNkCQBxN4cl4B2rRGayYLf3CewRqB/C6O2g=", "id"=>"13", "user"=>{"nick"=>"6 november", "tasks_attributes"=> {"40"=> {"title"=>"", "due_to(1i)"=>"2009", "due_to(2i)"=>"3", "due_to(3i)"=>"6", "description"=>""}}}}
the number 40 as the key is an id of the editing task. But it does not do the trick. Good idea would be to try and see how native rails helpers handle editing nested attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions