ChaelCodes/HuntersKeepers

View on GitHub
app/views/layouts/_navbar.html.erb

Summary

Maintainability
Test Coverage
<b-navbar shadow>
  <template slot="brand">
     <b-navbar-item href="/">HuntersKeepers</b-navbar-item>
  </template>
  <template slot="start">
    <b-navbar-item href='/hunters'>Hunters</b-navbar-item>
    <b-navbar-item href='/playbooks'>Playbooks</b-navbar-item>
  </template>
  <template slot="end">
    <b-navbar-item tag="div">
      <div class="buttons">
        <% if user_signed_in? %>
          <%= link_to 'Edit profile', edit_user_registration_path, class: 'button is-primary' %>
          <%= link_to 'Logout', destroy_user_session_path, method: :delete, class: 'button is-light' %>
        <% else %>
          <%= link_to 'Sign up', new_user_registration_path, class: 'button is-primary' %>
          <%= link_to 'Login', new_user_session_path, class: 'button is-light'  %>
        <% end %>
      </div>
    </b-navbar-item>
  </template>
</b-navbar>