From 2b4096e566868766e708dcef76a9bb70484afc30 Mon Sep 17 00:00:00 2001 From: Milan Cvetkovic Date: Tue, 5 Mar 2024 15:00:44 +0000 Subject: [PATCH] Remove "Sign up" and "Log in" from application bar when sessions or user controller are active --- app/views/layouts/_header.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 9f3d01b02..8942eb49c 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -104,7 +104,7 @@ <%= link_to t("layouts.logout"), logout_path(:referer => request.fullpath), :method => "post", :class => "geolink dropdown-item" %> - <% else %> + <% elsif (controller_name != "users" and controller_name != "sessions") || action_name != "new" %>
<%= link_to t("layouts.log_in"), login_path(:referer => request.fullpath), :class => "geolink btn btn-outline-secondary" %> <%= link_to t("layouts.sign_up"), user_new_path, :class => "btn btn-outline-secondary" %> -- 2.39.5