title: devise skip authentication based on route
body: <p>Having devise_for :users makes all methods of Users controller authenticated by Devise. I'd like to skip a couple of methods e.g <code>users#api, users#do_stuff</code> for making a public API with self-written auth method.</p>
  
  <p>How can I do it?</p>
  
  <p>UPDATE.</p>
  
  <pre><code>skip_before_filter :authenticate_user!, only: [:api, :do_stuff]
  </code></pre>
  
  <p>still gives me <code>{"error":"You need to sign in or sign up before continuing."}</code> </p>