Created
September 25, 2012 15:16
-
-
Save malachaifrazier/3782531 to your computer and use it in GitHub Desktop.
current_user.full_name shows method error because there is no user yet. Toss a conditional in there to fix all the things. if user_signed_in?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Treebook</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<a href="#" class="brand">Treebook</a> | |
<ul class="nav"> | |
<li><%= link_to "All Statuses", statuses_path %></li> | |
</ul> | |
<ul class="nav pull-right"> | |
<% if user_signed_in? %> | |
<li><%= link_to current_user.full_name, "#" %></li> | |
</ul> | |
<% end %> | |
</div> | |
</div> | |
<div class="container"> | |
<p class="notice"><%= notice %></p> | |
<p class="alert"><%= alert %></p> | |
<%= yield %> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is the user not signed in? If you sign up, are you not automatically signed in to the app immediately after signing up? Or perhaps, the issue is that you exit the rails server? This perplexed me a bit.