Created
May 2, 2013 20:27
-
-
Save brandoncordell/5505138 to your computer and use it in GitHub Desktop.
Problem destroying nested attributes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/patients/4/prescribe" for 127.0.0.1 at 2013-05-02 16:24:39 -0400 | |
Processing by PatientsController#prescribe as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"Y8q2s/H4QzKVX8v03mXKg282kLEaNIwsztwVjQaJL7Q=", "patient"=>{"prescriptions_attributes"=>{"0"=>{"product_id"=>"2", "total_amount_prescribed"=>"100", "total_amount_prescribed_quantity"=>"Tablets", "amount_prescribed"=>"1", "amount_prescribed_quantity"=>"Tablets", "frequency"=>"Daily", "_destroy"=>"1", "id"=>"3"}, "1"=>{"product_id"=>"", "total_amount_prescribed"=>"", "total_amount_prescribed_quantity"=>"", "amount_prescribed"=>"", "amount_prescribed_quantity"=>"", "frequency"=>"", "_destroy"=>"0"}}}, "commit"=>"Update Patient", "patient_id"=>"4"} | |
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] | |
{"utf8"=>"✓", "authenticity_token"=>"Y8q2s/H4QzKVX8v03mXKg282kLEaNIwsztwVjQaJL7Q=", "patient"=>{"prescriptions_attributes"=>{"0"=>{"product_id"=>"2", "total_amount_prescribed"=>"100", "total_amount_prescribed_quantity"=>"Tablets", "amount_prescribed"=>"1", "amount_prescribed_quantity"=>"Tablets", "frequency"=>"Daily", "_destroy"=>"1", "id"=>"3"}, "1"=>{"product_id"=>"", "total_amount_prescribed"=>"", "total_amount_prescribed_quantity"=>"", "amount_prescribed"=>"", "amount_prescribed_quantity"=>"", "frequency"=>"", "_destroy"=>"0"}}}, "commit"=>"Update Patient", "action"=>"prescribe", "controller"=>"patients", "patient_id"=>"4"} | |
[1m[36mPatient Load (0.1ms)[0m [1mSELECT "patients".* FROM "patients" WHERE "patients"."id" = ? AND ("patients"."deleted_at" IS NULL) LIMIT 1[0m [["id", "4"]] | |
[1m[35mPrescription Load (0.2ms)[0m SELECT "prescriptions".* FROM "prescriptions" WHERE "prescriptions"."patient_id" = 4 AND "prescriptions"."id" IN (3) | |
[1m[36mPrescription Load (0.1ms)[0m [1mSELECT "prescriptions".* FROM "prescriptions" WHERE "prescriptions"."patient_id" = 4[0m | |
prescription #1 | |
#<Prescription:0x007f841182b878> | |
marked for destruction?: true | |
prescription #2 | |
#<Prescription:0x007f8411829780> | |
marked for destruction?: false | |
[1m[35m (0.0ms)[0m begin transaction | |
[1m[36m (0.0ms)[0m [1mrollback transaction[0m | |
Redirected to http://localhost:3000/patients | |
Completed 302 Found in 11ms (ActiveRecord: 0.6ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment