title: Why can't Rails find my print layout file
body: <p>I have...</p>
  
  <p><strong>/config/routes.rb</strong>:</p>
  
  <pre><code>resources :documents do
     member do
        get :print
     end
  end
  </code></pre>
  
  <p><strong>/config/authorization_rules.rb</strong>:</p>
  
  <pre><code>role :admin do
      has_permission_on [:documents], :to =&gt; [:print]
    end
  </code></pre>
  
  <p><strong>app/controllers/documents_controller.rb</strong>:</p>
  
  <pre><code>def print
    render :layout =&gt; "print"
  end
  </code></pre>
  
  <p><strong>app/views/layouts/print.html.haml</strong>:</p>
  
  <pre><code>!!!
  %html
    %body
      = yield
  </code></pre>
  
  <p>I want to access this print layout file from print actions defined in several controllers.</p>
  
  <p>Why, when I am logged in as admin and go to <code>http://localhost:3000/documents/1/print</code>, do I get this error?</p>
  
  <pre><code>Missing template documents/print, application/print with {:locale=&gt;[:en], :formats=&gt;[:html], :handlers=&gt;[:erb, :builder, :coffee, :haml]}. Searched in:
    * "/Users/steven/Dropbox/testivate/app/views"
    * "/Users/steven/.rvm/gems/ruby-1.9.2-p320/gems/declarative_authorization-0.5.6/app/views"
  </code></pre>
  
  <p>Moving the <code>print.html.haml</code> file to <code>/app/views/application/</code> or <code>/app/views/documents/</code> changes the error but does not get rid of it.</p>