From 27a1584a0fd528c78c1f20848316a017fa444a11 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Fri, 6 Oct 2017 23:59:32 +0200 Subject: [PATCH] Check if user has already voted in a booth on this poll --- app/views/polls/questions/_answers.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/polls/questions/_answers.html.erb b/app/views/polls/questions/_answers.html.erb index 7fb4a5d71..7e995b21a 100644 --- a/app/views/polls/questions/_answers.html.erb +++ b/app/views/polls/questions/_answers.html.erb @@ -1,5 +1,5 @@
- <% 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) %>