0

I want to disable CSRF security for one controller. My ApplicationController looks like this:

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  protect_from_forgery with: :exception

And controller where i want to skip:

class HelpdeskInboxController < ApplicationController

  skip_before_action :authenticate_user!
  skip_before_action :verify_authenticity_token
  prepend_before_filter :require_no_authentication

  include Mandrill::Rails::WebHookProcessor
  authenticate_with_mandrill_keys! MANDRILL_CONFIG['WEBHOOKS']

And it isn't working i've got error

Can't verify CSRF token authenticity

When mandrill sends me an email.

Adrian Deja
  • 737
  • 1
  • 9
  • 17

1 Answers1

0

I believe skip_before_action :verify_authenticity_token will only work with rails 4. Try skip_before_filter instead.

maxhs
  • 868
  • 2
  • 10
  • 14