Show poll user answers in subsequent sessions

This commit is contained in:
Senén Rodero Rodríguez
2022-09-29 12:20:35 +02:00
parent 48d7ec75d0
commit f90d0d9c4d
5 changed files with 1 additions and 83 deletions

View File

@@ -10,12 +10,6 @@ class Polls::Questions::AnswersComponent < ApplicationComponent
user_answers.find_by(answer: question_answer.title).present?
end
def voted_before_sign_in?
user_answers.any? do |vote|
vote.updated_at < current_user.current_sign_in_at
end
end
def question_answers
question.question_answers
end