Rails 4 - Devise - admin approval of new users
<p>I'm trying to figure out how to follow this devise tutorial to add 'approved' to the user model.</p>

<p><a href="https://github.com/plataformatec/devise/wiki/How-To:-Require-admin-to-activate-account-before-sign_in" rel="nofollow">https://github.com/plataformatec/devise/wiki/How-To:-Require-admin-to-activate-account-before-sign_in</a></p>

<p>I have everything set up as shown in the tutorial, except when I save it all and try to click on the link called:</p>

<pre><code>&lt;%= link_to "Users awaiting approval", :action =&gt; "index", :approved =&gt; "false" %&gt;
</code></pre>

<p>I get an error called:</p>

<pre><code>undefined method `find_all_by_approved' for #&lt;Class:0x007fbc5cf34dd0&gt;
</code></pre>

<p>It highlights the second line of this users/index action:</p>

<pre><code>def index
    if params[:approved] == "false"
      @users = User.find_all_by_approved(false)
    else
      @users = User.all
      authorize @users
      end
  end
</code></pre>

<p>Does anyone know what else needs to be done (besides whats shown in the tutorial) to get this functionality to work?</p>