Skip to content

Instantly share code, notes, and snippets.

@gotva
Created September 22, 2013 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gotva/6662119 to your computer and use it in GitHub Desktop.
Save gotva/6662119 to your computer and use it in GitHub Desktop.
# "0" period existed before updating ("id"=>"645" - Period.id in database). The record is not destroyed, maybe it is edited
# "1" period is destroyed ("_destroy"=>"1"). Rails knows that Period.id=711 should be destroyed
# "new_1379871085948" new period
"periods_attributes"=>{
"0"=>{"from"=>"0", "to"=>"5", "_destroy"=>"false", "id"=>"645"},
"1"=>{"from"=>"6", "to"=>"7", "_destroy"=>"1", "id"=>"711"},
"new_1379871085948"=>{"from"=>"8", "to"=>"10", "_destroy"=>"false"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment