Hi, I have been trying Curt Hibbs'' tutorial parts 1 and 2 with MySQL.
Everything is fine except for edit/update. When I clicked the update button
from edit.rhtml I got:
=========================ActiveRecord::RecordNotFound in Recipe#update
Couldn''t find Recipe without an ID
/app/controllers/recipe_controller.rb:35:in `update''
script/server:49
Show framework trace
c:/ruby182/lib/ruby/gems/1.8/gems/activerecord-
1.11.1/lib/active_record/base.rb:352:in `find''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/base.rb:756:in `send''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/base.rb:756:in
`perform_action_without_filters''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/filters.rb:295:in
`perform_action_without_benchmark''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/benchmarking.rb:41:in
`perform_action_without_rescue''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/benchmarking.rb:41:in `measure''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/benchmarking.rb:41:in
`perform_action_without_rescue''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/rescue.rb:80:in `perform_action''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/base.rb:356:in `send''
c:/ruby182/lib/ruby/gems/1.8/gems/actionpack-
1.9.1/lib/action_controller/base.rb:356:in `process''
c:/ruby182/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in
`dispatch''
c:/ruby182/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in
`handle_dispatch''
c:/ruby182/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in
`service''
Request
Parameters: {"recipe"=>
{"title"=>"Hotchips", "id"=>"1",
"category_id"=>"1",
"description"=>"only for
the brave", "instructions"=>" pour a bottle of chilli
sauce on chips\r\n "}}
Show session dump
---
flash: !ruby/hash:ActionController::Flash::FlashHash
:notice: going to update
Response
Headers: {"cookie"=>[],
"Cache-Control"=>"no-cache"}
===========================================
the parameter seems OK, but why "cannot find without ID"?
Would appreciate any help, I have been trying to fix this myself for some time.