title: Helper Devise: could not find the `Warden::Proxy` instance on request environment
body: <p>I try to use Devise for my Rails app. I can sign up and login but when I go to my other page "build" I get the following error:</p>
  
  <blockquote>
    <p>Devise::MissingWarden in Home#show Devise could not find the
    <code>Warden::Proxy</code> instance on your request environment. Make sure that
    your application is loading Devise and Warden as expected and that the
    <code>Warden::Manager</code> middleware is present in your middleware stack. If
    you are seeing this on one of your tests, ensure that your tests are
    either executing the Rails middleware stack or that your tests are
    using the <code>Devise::Test::ControllerHelpers</code> module to inject the
    <code>request.env['warden']</code> object for you.</p>
  </blockquote>
  
  <p>Here is my controller:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery with: :exception
  
    private
    # Overwriting the sign_out redirect path method
    def after_sign_out_path_for(resource_or_scope)
      build_path
    end
  end
  </code></pre>
  
  <p>Here rea my two partial views:</p>
  
  <pre><code>&lt;!-- views/devise/menu/_login_items.html.erb --&gt;
  &lt;% if user_signed_in? %&gt;
    &lt;li&gt;
    &lt;%= link_to('Logout', destroy_user_session_path, :method =&gt; :delete) %&gt;
    &lt;/li&gt;
  &lt;% else %&gt;
    &lt;li&gt;
    &lt;%= link_to('Login', new_user_session_path)  %&gt;
    &lt;/li&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;!-- views/devise/menu/_registration_items.html.erb --&gt;
  &lt;% if user_signed_in? %&gt;
    &lt;li&gt;
    &lt;%= link_to('Edit registration', edit_user_registration_path) %&gt;
    &lt;/li&gt;
  &lt;% else %&gt;
    &lt;li&gt;
    &lt;%= link_to('Register', new_user_registration_path)  %&gt;
    &lt;/li&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>After debugging, I figured out that the problem is coming from this line in my "show" controller: template = HomeController.render('layouts/_template')</p>
  
  <p>Thanks for your help.</p>