small medium large xlarge

Generic-user-small
14 Dec 2007, 03:44
Esmaeil Khaksari (3 posts)

Have had some issues with the AWDR Depot example (Part 2, Chapter 6), first with the scaffolding change in Rails 2 (my environment as that’s what ships with OSX 10.5); that was fixed easily enough as there is some documentation on the issue.

In any case I’ve run into a seperate issue, as described, exactly, here: http://forums.pragprog.com/forums/50/topics/168

Could anyone provide information as to how to fix this? If its simply a matter of writing a couple of lines of code, could someone lay it on me? Is there a beta to Agile Web Development with Rails that might have some of this written up?

Generic-user-small
14 Dec 2007, 04:44
Esmaeil Khaksari (3 posts)

I hate to make it seem as thought I didn’t do my due diligence prior to posting, however, in the linked post, Donal says that he tried commenting out the “protect_from_forgery” line in application.rb, and I assumed (I know, I know!) that the same would be true in my situation. Wrong.

Commenting out the protect line got me up running again.

Thanks! Esmaeil

Lilsteve_pragsmall
23 Dec 2007, 16:26
Steve Jones (14 posts)

Whoops, seems like I also did not fully research before posting. I also just commented out “protect_from_forgery” and am up and running. –Thanks

Generic-user-small
02 May 2008, 23:06
Fredrik W (3 posts)

A better solution would be to uncomment the :secret symbol on the line protect_from_forgery :secret => ‘xxx’ in your application.rb file (found in app/controllers/application.rb)

You must be logged in to comment