From 3941bad0751fc2e59576d77bef531b0088571104 Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Tue, 7 Jun 2022 15:21:42 -0600 Subject: [PATCH] DEV: Remove this chained user scope (#17029) This reverts one of the changes introduced just now in: 27d7b0c6de73cb0cd2bd5137b5a58c151bd83289 I don't think we need this `activated_not_suspended_not_staged` scope because we can just compose it ourselves via method chaining like `User.activated.not_suspended.not_staged`. --- app/models/user.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 92ae57dd0a9..2bef343009d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -221,7 +221,6 @@ class User < ActiveRecord::Base scope :not_suspended, -> { where('suspended_till IS NULL OR suspended_till <= ?', Time.zone.now) } scope :activated, -> { where(active: true) } scope :not_staged, -> { where(staged: false) } - scope :activated_not_suspended_not_staged, -> { self.activated.not_suspended.not_staged } scope :filter_by_username, ->(filter) do if filter.is_a?(Array)