水曜日, 6月 30, 2010

catch InvalidAuthenticityToken Error

catch InvalidAuthenticityToken Error

ActionController::RequestForgeryProtection.module_eval do

alias :vat :verify_authenticity_token

def verify_authenticity_token(*args)

vat(*args) rescue redirect_to logout_path

end

end

Rails 2.0・その12(CSRFを勝手に防止)

Rails 2.0・その12(CSRFを勝手に防止)