From aee64a465c5219bebb643e60d4a57ffc257931bf Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 19 Dec 2024 03:10:06 -0500 Subject: [PATCH] Remove unused `Poll.unattached` scope (#33350) --- app/models/poll.rb | 1 - spec/models/poll_spec.rb | 8 -------- 2 files changed, 9 deletions(-) diff --git a/app/models/poll.rb b/app/models/poll.rb index ebd4644094..4844d2d23c 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -40,7 +40,6 @@ class Poll < ApplicationRecord validates_with PollValidator, on: :create, if: :local? scope :attached, -> { where.not(status_id: nil) } - scope :unattached, -> { where(status_id: nil) } before_validation :prepare_options, if: :local? before_validation :prepare_votes_count diff --git a/spec/models/poll_spec.rb b/spec/models/poll_spec.rb index 66f521ab3f..0a4892eba4 100644 --- a/spec/models/poll_spec.rb +++ b/spec/models/poll_spec.rb @@ -20,14 +20,6 @@ RSpec.describe Poll do expect(results).to eq([attached_poll]) end end - - describe '.unattached' do - it 'finds the correct records' do - results = described_class.unattached - - expect(results).to eq([not_attached_poll]) - end - end end describe '#reset_votes!' do