search for: protectfromforgery

Displaying 1 result from an estimated 1 matches for "protectfromforgery".

Did you mean: protect_from_forgery
2008 Mar 15
3
[HELP]No :secret given to the #protect_from_forgery call
...controllers/usuario_controller_spec.rb:30: script/spec:4: This is the only failure. Line 30 is the post "create". I am on Ruby 1.8.6, Rails 2.0.2, Rspec 1.1.3 (saw in vendor/plugins/rspec/CHANGES). I searched google for solutions, found this: http://blog.stonean.com/2007/12/rspec-and-protectfromforgery.html then I added @controller.class.protect_from_forgery :secret => "secretkey" in the before(:each) method. I put the same secret key I found in environment.rb. But now it gives me: ActionController::InvalidAuthenticityToken I am lost. Why this happens? should not work just fine fro...