From 156f0a221ea5d68b8a47ffa959d48d3639cb7e97 Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 9 Oct 2020 11:47:28 +0200 Subject: Wrap debug with login To avoid breaking on logout --- app/views/welcome/index.html.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/views/welcome') diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 1977962..1b6ab77 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -12,10 +12,12 @@ <%= tag.div(id: 'map') %> <% content_for :debug do %> -

Premier élément de la liste:

- <% res = @resources.first %> -

<%= res.feature["properties"]["name"] %>

-

<%= res.feature["geometry"]["coordinates"] %>

+ <% if current_user.present? %> +

Premier élément de la liste:

+ <% res = @resources.first %> +

<%= res.feature["properties"]["name"] %>

+

<%= res.feature["geometry"]["coordinates"] %>

+ <% end %><%# ensure it does not break when we don't have a record... %> <% end %> <% content_for :body_end do %> -- cgit v1.2.3