Skip to content

Instantly share code, notes, and snippets.

@elrok123
Created May 12, 2013 20:09
Show Gist options
  • Save elrok123/5564734 to your computer and use it in GitHub Desktop.
Save elrok123/5564734 to your computer and use it in GitHub Desktop.
Error I recvieve when saving multiple products to one order. Products recieved but saving throwing error because order id is null.
ActiveRecord::RecordNotFound in OrdersController#create
Couldn't find Product with ID=1 for Order with ID=
Rails.root: /BillingSystem
Application Trace | Framework Trace | Full Trace
app/controllers/orders_controller.rb:10:in `new'
app/controllers/orders_controller.rb:10:in `create'
Request
Parameters:
{"utf8"=>"✓",
"authenticity_token"=>"jE2wdERoxE7PKwBhN60KAfguxwAq8qdW4wbru51SMFg=",
"order"=>{"client_id"=>"1",
"products_attributes"=>{"1368389171328"=>{"id"=>"1",
"_destroy"=>"false"}}},
"commit"=>"Create Order"}
Show session dump
Show env dump
Response
Headers:
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment