From 47ee8a2f79ca504be9df8e2b02349033378185a5 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 6 Oct 2017 16:19:55 +0200 Subject: [PATCH] shows answer title on polls show only if description is present --- app/views/polls/show.html.erb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index b632fac55..914c39d85 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -60,25 +60,28 @@
-
+
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
+ data-toggler=".medium-6" data-equalizer-watch> -

<%= answer.title %>

+ <% if answer.description.present? %> +

<%= answer.title %>

+ <% end %> <% if answer.images.any? %> <%= render "gallery", answer: answer %> <% end %> -
- <%= safe_html_with_links simple_format(answer.description) %> -
+ <% if answer.description.present? %> +
+ <%= safe_html_with_links simple_format(answer.description) %> +
+ <% end %>
<% end %>
-