unable to find scope NilClassPolicy::Scope for NilClass
<p>I am building application that currently has a simple authorization requirments:</p>

<p>All users can view the data of all controllers.
Only Admin can create/edit the data.
The project use admin gem so no controllers in my application (although I can overide if needed)
I would like to add authorization for the generic requirement for all controllers:</p>

<pre><code>class ApplicationController &lt; Administrate::ApplicationController
  before_filter :authenticate_admin
  def authenticate_admin
    authorize requested_resource # requested_form is the relevant object(e.g. Post @post)
  end
end
</code></pre>

<p>but then I get the following:</p>

<p>unable to find scope NilClassPolicy::Scope for NilClass
app/policies/application_policy.rb:41:in scope' app/policies/application_policy.rb:15:inshow?'
app/controllers/admin/application_controller.rb:27:in `authenticate_admin'</p>

<p>Seems like it can't find the policy, what do you think?</p>