Hi,
I'm trying to create a link in layouts/application.html.erb to login/logout/register but i found this problem:
ActionView::Template::Error (undefined method `user_signed_in?' for #<#Class:0xb55a3d8:0xb5594b0>):
9:
10:
11:
12: <% if user_signed_in? %>
13: Signed in as <%= current_user.email %>. Not you?
14: <%= link_to "Sign out", destroy_user_session_path %>
15: <% else %>
Have anybody found same problem?
The code in application.html.erb is just:
<% if user_signed_in? %>
Signed in as <%= current_user.email %>. Not you?
<%= link_to "Sign out", destroy_user_session_path %>
<% else %>
<%= link_to "Sign up", new_user_registration_path %> or
<%= link_to "Sign in", new_user_session_path %>
<% end %>
Many thanks!!!
Hi,
I'm trying to create a link in layouts/application.html.erb to login/logout/register but i found this problem:
ActionView::Template::Error (undefined method `user_signed_in?' for #<#Class:0xb55a3d8:0xb5594b0>):
9:
10:
11:
12: <% if user_signed_in? %>
13: Signed in as <%= current_user.email %>. Not you?
14: <%= link_to "Sign out", destroy_user_session_path %>
15: <% else %>
Have anybody found same problem?
The code in application.html.erb is just:
Many thanks!!!