diff --git a/app/helpers/polls_helper.rb b/app/helpers/polls_helper.rb index 27d33ea04..a676084cb 100644 --- a/app/helpers/polls_helper.rb +++ b/app/helpers/polls_helper.rb @@ -41,4 +41,8 @@ module PollsHelper booth.name + location end + def voted_before_sign_in(question) + current_user.current_sign_in_at >= question.poll.voters.find_by_user_id(current_user).updated_at + end + end diff --git a/app/views/polls/questions/_answers.html.erb b/app/views/polls/questions/_answers.html.erb index ccc9f0322..7fb4a5d71 100644 --- a/app/views/polls/questions/_answers.html.erb +++ b/app/views/polls/questions/_answers.html.erb @@ -1,7 +1,7 @@