diff options
Diffstat (limited to 'app/views/welcome')
-rw-r--r-- | app/views/welcome/index.html.erb | 10 |
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 %> |