views:

899

answers:

1

When I have a specific action that I don't want to check the authenticity token on, how do I tell Rails to skip checking it?

+7  A: 

For individual actions, you can do:

protect_from_forgery :only => [:update, :delete, :create]
#or
protect_from_forgery :except => [:update, :delete, :create]

For an entire controller, you can do:

skip_before_filter :verify_authenticity_token
edebill