Guest User

Untitled

a guest
Jan 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. # parameters that are being sent:
  2.  
  3. Processing by ExamTemplatesController#create as HTML
  4. Parameters: {"commit"=>"Create Exam Template", "authenticity_token"=>"XGTV17fAkOxLt4Z8Of4BNXBbh3iAILxhMJFKTL1yVBw=", "utf8"=>"\342\234\223", "exam_sheet_template"=>{"category_id"=>"2"}, "exam_template"=>{"name"=>"test", "exam_sheet_template_attributes"=>{"0"=>{"amount"=>"2", "_destroy"=>"0"}, "1"=>{"amount"=>"2", "_destroy"=>"0"}, "2"=>{"amount"=>"2", "_destroy"=>"0"}}}}
  5.  
  6. # as you can see, "exam_sheet_template"=>{"category_id"=>"2"}" is set only once, outside the exam_sheet_template attributes section, where i expect it.
  7.  
  8. <p>
  9. <%= collection_select(:exam_sheet_template, :category_id, Category.all, "id", "category_name") %>
  10. <%= f.text_field :amount, :size => 2 %>
  11. <%= f.check_box :_destroy %>
  12. <%= f.label :_destroy, "Remove Exam Sheet" %><br/>
  13. </p>
Add Comment
Please, Sign In to add comment