Working through the 3rd edition book …
I found the :secret line in config/initializers/session_store.rb. The book says to find it in config/environment.rb. Is this a book erratum?
The book says to uncomment the line beginning with protect_from_forgery, in the file app/controllers/application.rb. I found this line in the application_controller.rb file. Is this a book erratum?
After making the change, an error was displayed in my app ActionController::InvalidAuthenticityToken. Looked around the web for coaching. A suggestion was made to add this: ` protect_from_forgery :only => [:create, :update, :destroy] ` Added this to app/controllers/store_controller.rb and the error message was no longer displayed.
Most recent error: Couldn’t find Product without an ID The id is displayed in the error trace: “id” => “5”, so it appears evident that the :id => product parameter was added to button_to in app/views/store/index.html.erb. visual inspection confirms it is there. See page 102.
I’m confused. What the heck is going on?
- jruby -v : jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419) [x86-java]
- jruby -S rails -v : Rails 2.3.2 Many thanks! David