Remove unused method Poll::Question.answerable_by

This method isn't used since commit 909114bcf.
This commit is contained in:
Javi Martín
2025-07-03 17:25:34 +02:00
parent 3ddba8660e
commit b81bbeaa96

View File

@@ -43,12 +43,6 @@ class Poll::Question < ApplicationRecord
delegate :answerable_by?, to: :poll
def self.answerable_by(user)
return none if user.nil? || user.unverified?
where(poll_id: Poll.answerable_by(user).pluck(:id))
end
def options_total_votes
question_options.reduce(0) { |total, question_option| total + question_option.total_votes }
end