From de1401f8e6954f41e61360d9eb8b4fa6e6989a47 Mon Sep 17 00:00:00 2001 From: taitus Date: Fri, 24 Oct 2025 09:32:26 +0200 Subject: [PATCH] Remove unused by_author scope from Poll::PartialResult The "by_author" scope in Poll::PartialResult is no longer used anywhere in the code. Its usage was replaced by Poll::Answer.by_author in commit 6bc4f5b30747 ("adds Poll::Answer model for web users"). --- app/models/poll/partial_result.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/poll/partial_result.rb b/app/models/poll/partial_result.rb index d671d6184..b24f39bb1 100644 --- a/app/models/poll/partial_result.rb +++ b/app/models/poll/partial_result.rb @@ -15,7 +15,6 @@ class Poll::PartialResult < ApplicationRecord validates :origin, inclusion: { in: ->(*) { VALID_ORIGINS }} validates :option, uniqueness: { scope: [:booth_assignment_id, :date] }, allow_nil: true - scope :by_author, ->(author_id) { where(author_id: author_id) } scope :by_question, ->(question_id) { where(question_id: question_id) } before_save :update_logs