I am trying to use Devise for my Rails application. I can register and login, but when I go to another "build" page, I get the following error:
Devise :: MissingWarden in Home # show Devise could not find Warden::Proxy in the request environment. Make sure your application loads Devise and Warden as expected, and that Warden::Manager middleware is present in your middleware stack. If you see this on one of your tests, make sure that your tests are either running the Rails middleware stack, or that your tests using the Devise::Test::ControllerHelpers module to enter request.env['warden'] for you.
Here is my controller:
class ApplicationController < ActionController::Base protect_from_forgery with: :exception private
Here are my two partial views:
<% if user_signed_in? %> <li> <%= link_to('Logout', destroy_user_session_path, :method => :delete) %> </li> <% else %> <li> <%= link_to('Login', new_user_session_path) %> </li> <% end %>
and
<% if user_signed_in? %> <li> <%= link_to('Edit registration', edit_user_registration_path) %> </li> <% else %> <li> <%= link_to('Register', new_user_registration_path) %> </li> <% end %>
After debugging, I realized that the problem comes from this line in my show controller: template = HomeController.render ('layouts / _template')
Thank you for your help.
source share