diff --git a/app/views/elements/_navbar.html.erb b/app/views/elements/_navbar.html.erb new file mode 100644 index 0000000..087a019 --- /dev/null +++ b/app/views/elements/_navbar.html.erb @@ -0,0 +1,35 @@ + + + + + Toggle navigation + + + + + <%= link_to "My Application", defined?(root_path) ? root_path : "#", class: "navbar-brand" %> + + + + + + + + <% if defined?(Devise) %> + <% if user_signed_in? %> + + Account + + <%= link_to "Edit Account", edit_user_registration_path %> + + <%= link_to "Sign Out", destroy_user_session_path, method: :delete %> + + + <% else %> + <%= link_to "Login", new_user_session_path %> + <%= link_to "Sign Up", new_user_registration_path %> + <% end %> + <% end %> + + +