<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <%= link_to "WriteNow", root_path, class: "navbar-brand" %>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
        <% if current_user %>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Account <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
              <li><%= link_to "Profile", user_path(current_user) %></li>
              <li class="divider"></li>
              <li><%= link_to "Logout", logout_path, method: :delete %></li>
            </ul>
          </li>
        <% else %>
          <li><%= link_to "Signup", signup_form_path %></li>
          <li><%= link_to "Login", login_form_path %></li>
        <% end %>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <%= link_to "WriteNow", root_path, class: "navbar-brand" %>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
        <% if session[:user_id] %>
          <li><%= link_to "Profile", user_path(current_user) %></li>
          <li><%= link_to "Logout", logout_path, method: :delete %></li>
        <% else %>
          <li><%= link_to "Signup", signup_form_path %></li>
          <li><%= link_to "Login", login_form_path %></li>
        <% end %>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
Add correct global nav links and session check to global_nav in app layout.
Add correct global nav links and session check to global_nav in app layout.
