From b81bbeaa96c0f1b713e4ee14de786594e6a4024c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 3 Jul 2025 17:25:34 +0200 Subject: [PATCH] Remove unused method Poll::Question.answerable_by This method isn't used since commit 909114bcf. --- app/models/poll/question.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/poll/question.rb b/app/models/poll/question.rb index f1015bba7..c11d8c654 100644 --- a/app/models/poll/question.rb +++ b/app/models/poll/question.rb @@ -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