From dea9110a69662a3eb7ea2cc53966eba3dc1a4356 Mon Sep 17 00:00:00 2001 From: Rod Wilhelmy Date: Wed, 9 Dec 2015 12:29:26 -0600 Subject: [PATCH] Fix nil error for non-logged users in proposals#show --- app/views/proposals/show.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index eb49837e6..6e8245c8d 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -6,7 +6,11 @@ social_description: @proposal.summary %> <% end %> <% cache [locale_and_user_status(@proposal), @proposal, @proposal.author, Flag.flagged?(current_user, @proposal), @proposal_votes] do %> -
data-user-id=<%= current_user.id %>> + <% if current_user %> +
data-user-id=<%= current_user.id %>> + <% else %> +
+ <% end %>