Rails devise: user_signed_in? not working

后端 未结 6 2187
终归单人心
终归单人心 2020-12-03 14:21

I have this in my view:

<% if user_signed_in? %>
<%= current_user.email %>
<% else %>
<%= link_to \"Sign in\", new_user_session_path %&g         


        
6条回答
  •  醉话见心
    2020-12-03 15:07

    I had encountered exactly the same issue and solved it by doing $bundle exec rails g devise user again. My problem was devise_for users was somehow missing in the routing file.

提交回复
热议问题