Prevent user from seeing its votes in a poll after signing in
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user