[Facebooker-talk] form_tag and form_for cause #protect_from_forgery errors

Jaime Bulmer jbulmer at spheric.ca
Tue Apr 8 20:24:07 EDT 2008


Can't remember the orginal writer of this but put in your /lib to  
disable forgery protection while in facebook.

ActionController::RequestForgeryProtection.module_eval do
   alias :original_verify_authenticity_token :verify_authenticity_token

   def verify_authenticity_token(*args)
     if controller.params.include?('fb_sig') && controller.action ==  
'sekret_method'
       # Pretend to call this before_filter.
       true
     else
       original_verify_authenticity_token(*args)
     end
   end
end



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080408/7c0444f8/attachment.html 


More information about the Facebooker-talk mailing list