diff --git a/app/helpers/polls_helper.rb b/app/helpers/polls_helper.rb index a676084cb..c66db216f 100644 --- a/app/helpers/polls_helper.rb +++ b/app/helpers/polls_helper.rb @@ -42,7 +42,7 @@ module PollsHelper end def voted_before_sign_in(question) - current_user.current_sign_in_at >= question.poll.voters.find_by_user_id(current_user).updated_at + current_user.current_sign_in_at >= question.answers.find_or_initialize_by(author: current_user).updated_at end end