Created
February 9, 2011 07:11
Revisions
-
mataki created this gist
Feb 9, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ module ActionController module RequestForgeryProtection protected def verify_authenticity_token verified_request? || handle_unverified_request end # Process logout def handle_unverified_request reset_session end def verified_request? !protect_against_forgery? || request.get? || form_authenticity_token == form_authenticity_param || form_authenticity_token == request.headers['X-CSRF-Token'] end end end