verify_authenticity_token has not been defined
<p>Ruby version 2.2.4, Rails version 5.0.0.1.</p>

<p>I'm getting stuck at a part of a <a href="http://lucatironi.net/tutorial/2012/10/15/ruby_rails_android_app_authentication_devise_tutorial_part_one/" rel="noreferrer">tutorial</a> where you test login with <code>curl</code>. I get an error</p>

<blockquote>
  <p>ArgumentError (Before process_action callback: verify_authenticity_token has not been defined).</p>
</blockquote>

<p>I used this code in sessions_controller: </p>

<pre><code>skip_before_action :verify_authenticity_token, :if =&gt; Proc.new { |c| c.request.format == 'application/json' }
</code></pre>

<p>Does somebody know the answer?</p>