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
6bc4f5b307 ("adds Poll::Answer model for web users").
This commit is contained in:
taitus
2025-10-24 09:32:26 +02:00
parent 837a7af444
commit de1401f8e6

View File

@@ -15,7 +15,6 @@ class Poll::PartialResult < ApplicationRecord
validates :origin, inclusion: { in: ->(*) { VALID_ORIGINS }} validates :origin, inclusion: { in: ->(*) { VALID_ORIGINS }}
validates :option, uniqueness: { scope: [:booth_assignment_id, :date] }, allow_nil: true 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) } scope :by_question, ->(question_id) { where(question_id: question_id) }
before_save :update_logs before_save :update_logs