title: Route for custom action in controller inheriting from Devise::SessionsController
body: <p>I have a session controller which inherits from Devise::SessionsController:</p>
  
  <pre><code>class SessionsController &lt; Devise::SessionsController
  
    skip_before_filter :authenticate_user!, :only =&gt; [:get_token]
  
    def create
     ....
    end
  
   def destroy
    ...
   end
  
   def get_token
     response.headers["app-key"] = form_authenticity_token()
     render :text=&gt;'Token Set'
   end
  
  end
  </code></pre>
  
  <p>As you can see above i am overwriting create and destroy action and i have added another action named get_token. I added routes for it as shown below:</p>
  
  <p>Routes.rb</p>
  
  <pre><code>Application.routes.draw do
  
    devise_for :users, :controllers =&gt; { :sessions =&gt; "sessions" }, :path =&gt; "users",      :path_names =&gt; { :sign_in =&gt; 'login', :sign_out =&gt; 'logout',:confirmation =&gt; 'verification'}
  
    match 'get_token', :to =&gt; 'sessions#get_token'
  </code></pre>
  
  <p>But I am getting the following errror when i am trying to access get_token method;</p>
  
  <pre><code>[Devise] Could not find devise mapping for path "/get_token". 
  </code></pre>
  
  <p>How to add route for the get_token action.</p>
  
  <p>Thanks in advance</p>