aboutsummaryrefslogtreecommitdiff
path: root/app/views/welcome/index.html.erb
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-10-09 11:47:28 +0200
committerhellekin <hellekin@cepheide.org>2020-10-09 11:47:28 +0200
commit156f0a221ea5d68b8a47ffa959d48d3639cb7e97 (patch)
tree00ec0f49a29bacf5d374b4a9f8465ec82fb9e800 /app/views/welcome/index.html.erb
parentf193e708285db21e9e3dffbe96c9961a9865e2db (diff)
downloadincommon-map-156f0a221ea5d68b8a47ffa959d48d3639cb7e97.tar.gz
Wrap debug with login
To avoid breaking on logout
Diffstat (limited to 'app/views/welcome/index.html.erb')
-rw-r--r--app/views/welcome/index.html.erb10
1 files changed, 6 insertions, 4 deletions
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 %>
- <p>Premier élément de la liste:</p>
- <% res = @resources.first %>
- <p><%= res.feature["properties"]["name"] %></p>
- <p><%= res.feature["geometry"]["coordinates"] %></p>
+ <% if current_user.present? %>
+ <p>Premier élément de la liste:</p>
+ <% res = @resources.first %>
+ <p><%= res.feature["properties"]["name"] %></p>
+ <p><%= res.feature["geometry"]["coordinates"] %></p>
+ <% end %><%# ensure it does not break when we don't have a record... %>
<% end %>
<% content_for :body_end do %>