No documentation available for this module.

Files

  • actionpack/lib/action_controller/metal/request_forgery_protection.rb

1Note

Turn off for individual controllers/actions

rob-twf ยท Feb 18, 20094 thanks

To disable protection for all actions in your controller use skip_before_filter:

skip_before_filter :verify_authenticity_token

You can also pass :only and :except to disable protection for specific actions, e.g:

skip_before_filter :verify_authenticity_token, :only => :index