Generic-user-small Esmaeil Khak... 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 Esmaeil Khak... 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_small Steve Jones 12 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 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)

4 posts, 3 voices