From d07e04e51102bc415db8a952ee84a65cd08f47b2 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Fri, 12 Jul 2019 14:33:41 +0200 Subject: [PATCH] Fix dooble flash_alerts load --- app/views/layouts/main.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/main.html.erb b/app/views/layouts/main.html.erb index 2c71c2659..181b4b0f6 100644 --- a/app/views/layouts/main.html.erb +++ b/app/views/layouts/main.html.erb @@ -1,7 +1,9 @@ <% content_for :content do %>
- <%= render partial: 'shared/flash_alerts', - locals: { flash: flash, notice: notice, alert: alert } %> + <% if user_signed_in? %> + <%= render partial: 'shared/flash_alerts', + locals: { flash: flash, notice: notice, alert: alert } %> + <% end %> <%= yield %>
<% end %>