Skip to content

Commit e54c4ce

Browse files
committed
Update scopes
1 parent 989bf8c commit e54c4ce

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/models/action_officer.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class ActionOfficer < ApplicationRecord
3838
belongs_to :deputy_director
3939
belongs_to :press_desk
4040

41-
scope :inactive_list, -> { where("deleted = ?", true) }
42-
scope :active_list, -> { where("deleted = ?", false) }
41+
scope :inactive_list, -> { where(deleted: true) }
42+
scope :active_list, -> { where(deleted: false) }
4343

4444
before_validation Validators::Whitespace.new
4545

app/models/early_bird_member.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class EarlyBirdMember < ApplicationRecord
1818
validates :email, presence: true, uniqueness: true, on: :create # rubocop:disable Rails/UniqueValidationWithoutIndex
1919
validates :email, format: { with: Devise.email_regexp }
2020

21-
scope :active_list, -> { where("early_bird_members.deleted = ?", false) }
22-
scope :inactive_list, -> { where("early_bird_members.deleted = ?", true) }
21+
scope :active_list, -> { where(deleted: false) }
22+
scope :inactive_list, -> { where(deleted: true) }
2323

2424
before_validation Validators::Whitespace.new
2525
end

0 commit comments

Comments
 (0)