Tuesday, December 18, 2007

Rails 2.02 ActionController::InvalidAuthenticityToken Fix

If you've set ActiveRecord cookie store, i.e. store cookies in the database, then you'll also need to uncomment the following line from app/controllers/application.rb

protect_from_forgery :secret => 'somerandomlygeneratedstringofchars666'


After uncommenting this line, restart your mongrel server and this should fix the ActionController::InvalidAuthenticityToken error.

No comments: