Currently devise is always redirecting me to /users/sign_in
when no session is available. I want to change that redirect to a custom route, for example /home
. Is this possible?
Yes .It is possible. Change the line in application.html.erb file in app/view/layouts from
<%= link_to "Login", new_user_session_path, :class => 'navbar-link' %>
to
<%= link_to "Login", your_custom_path, :class => 'navbar-link' %>