Check if user has already voted in a booth on this poll

This commit is contained in:
Bertocq
2017-10-06 23:59:32 +02:00
parent 638fcdbc1d
commit 27a1584a0f

View File

@@ -1,5 +1,5 @@
<div class="poll-question-answers">
<% if can? :answer, question %>
<% if can?(:answer, question) && question.poll.voted_in_booth?(current_user) %>
<% question.question_answers.each do |answer| %>
<% if @answers_by_question_id[question.id] == answer.title && !voted_before_sign_in(question) %>
<span class="button answered"