title: Pundit throws undefined method `user'
body: <p>I cannot restrict the Project model view to a owning user. Cannot figure this one out:</p>
  
  <p>Error:</p>
  
  <pre><code>undefined method `user' for #&lt;Project::ActiveRecord_Relation:0x007f94b25dd010&gt;
  </code></pre>
  
  <p>project_policy.rb</p>
  
  <pre><code>class ProjectPolicy &lt; ApplicationPolicy
    def show?
      user.present? &amp;&amp; user == record.user
    end
  end
  </code></pre>
  
  <p>Projects controller</p>
  
  <pre><code>class ProjectsController &lt; ApplicationController
  
    def show
      @project = Project.find(params[:id])
      @pages = @project.pages
      authorize @projects
    end
  </code></pre>
  
  <p>If I remove the <code>user == record.user</code> all works fine</p>
  
  <p><code>application_policy</code> file is default</p>
  
  <p>Project belongs to User
  User has many Projects</p>
  
  <p><code>project.user</code> in the console works fine.</p>