Remove unused method Poll::Question.answerable_by
This method isn't used since commit 909114bcf.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user