title: Rails - Skip Devise Authentication Not Working
body: <p>I'm trying to skip devise authentication for my subscription controller but to no avail.  My registration controller and sessions controller skip_before_filter both work but not the subscriptions controller which I just added recently.  What am I doing wrong?</p>
  
  <pre><code>class V1::SubscriptionsController &lt; ApplicationController
  skip_before_filter :authenticate_user!
  skip_before_filter :verify_authenticity_token, if: :json_request?
  
  
  def create
  
      @subscription = Subscription.new(subscription_params)
  
      if @subscription.save 
          render json: @subscription, status: :created
      else
          render json: @subscription.errors, status: :unprocessable_entity
      end
  end
  
  private
  
  def subscription_params
      params.require(:subscription).permit(:subscription_email)
  end
  end
  </code></pre>
  
  <p>My application controller</p>
  
  <pre><code>class ApplicationController &lt; ActionController::API
    include CanCan::ControllerAdditions
    include ActionController::RespondWith
    include ActionController::Serialization
  
    acts_as_token_authentication_handler_for User
  
    rescue_from CanCan::AccessDenied do |exception|
      respond_to do |format|
        format.json { render nothing: true, status: :forbidden }
  
      end
    end
  end
  </code></pre>
  
  <p>And my routes</p>
  
  <pre><code>Rails.application.routes.draw do
  
  devise_for :users, skip: [:sessions, :registrations, :passwords]
  
    api_version(module: "V1", header: { name: "Accept", value: "application/vnd.rolotext.json; version=1" }) do
      devise_scope :user do
        post 'registrations' =&gt; 'registrations#create'
  
  
        post 'sessions' =&gt; 'sessions#create'
        delete 'sessions' =&gt; 'sessions#destroy'
  
        post 'passwords' =&gt; 'passwords#create'
        patch 'passwords' =&gt; 'passwords#update'
        post   'passwords/check_email' =&gt; 'passwords#check_email'
      end
  
      get '/me' =&gt; "users#me"
      patch '/me' =&gt; 'users#update'
      delete '/me' =&gt; 'users#destroy'
  
  
      resources :cards, except: [ :new, :edit]
      patch '/logos' =&gt; 'logos#update'
      resources :logos, except: [ :new, :edit, :destroy ]
      resources :uploads
      post '/subscriptions' =&gt; "subscriptions#create"
  
    end
  end
  </code></pre>
  
  <p>Any help would be mucho appreciated</p>