<!DOCTYPE html>
<html lang="en">
<head>
  <!--
    normalize.css removes cross-browser differences in defaults, e.g.,
    differences in how form elements appear between Firefox and IE
    See: http://necolas.github.com/normalize.css/
  -->
  <link rel="stylesheet" href="/css/normalize.css">
  <!--
    application.css is where you put your styles
  -->
  <link rel="stylesheet" href="/css/application.css">

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script src="/js/application.js"></script>

  <script type="text/javascript" src="/js/jquery.leanModal.min.js"></script>

  <title></title>
</head>
<body>
  <div id="header">
    <!-- IF User is not logged in, show login link -->
    <!-- ELSE Show User.name linked to User profile -->
    <a href="/login">Login</a>
  </div>
  <%= yield %>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
  <!--
    normalize.css removes cross-browser differences in defaults, e.g.,
    differences in how form elements appear between Firefox and IE
    See: http://necolas.github.com/normalize.css/
  -->
  <link rel="stylesheet" href="/css/normalize.css">
  <!--
    application.css is where you put your styles
  -->
  <link rel="stylesheet" href="/css/application.css">

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script src="/js/application.js"></script>

  <script type="text/javascript" src="/js/jquery.leanModal.min.js"></script>

  <title></title>
</head>
<body>
  <div id="header">
    <% if current_user %>
    <a href="/user/<%= current_user.id%>/"><%= current_user.name %></a> | <a href="/signout">Logout</a>
    <% else %>
    <a id="go_login" rel="leanModal" href="#login">Login</a>

    <% end %>
  </div>
  <%= yield %>
</body>
</html>

Check to see user is logged in or not
Check to see user is logged in or not
