From 8dabdd1ff018865054d33261110c158a739d708b Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Thu, 29 Aug 2024 09:09:15 +0100 Subject: [PATCH] Lint offences --- app/models/location.rb | 4 ++-- app/models/scheme.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/location.rb b/app/models/location.rb index 8ef6b1715..93bc2ff7d 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -103,7 +103,7 @@ class Location < ApplicationRecord .where.not(id: joins(scheme: [:owning_organisation]).merge(Location.deactivated_by_organisation).pluck(:id)) .where.not(id: incomplete.pluck(:id)) .where.not(id: joins(:location_deactivation_periods).merge(Location.deactivating_soon_directly).pluck(:id)) - .where.not(id: joins(scheme: [:owning_organisation, :scheme_deactivation_periods]).merge(Location.deactivating_soon_by_scheme).pluck(:id)) + .where.not(id: joins(scheme: %i[owning_organisation scheme_deactivation_periods]).merge(Location.deactivating_soon_by_scheme).pluck(:id)) .where.not(id: activating_soon.pluck(:id)) } @@ -114,7 +114,7 @@ class Location < ApplicationRecord .where.not(id: joins(scheme: [:owning_organisation]).merge(Location.deactivated_by_organisation).pluck(:id)) .where.not(id: incomplete.pluck(:id)) .where.not(id: joins(:location_deactivation_periods).merge(Location.deactivating_soon_directly(date)).pluck(:id)) - .where.not(id: joins(scheme: [:owning_organisation, :scheme_deactivation_periods]).merge(Location.deactivating_soon_by_scheme(date)).pluck(:id)) + .where.not(id: joins(scheme: %i[owning_organisation scheme_deactivation_periods]).merge(Location.deactivating_soon_by_scheme(date)).pluck(:id)) .where.not(id: activating_soon(date).pluck(:id)) } diff --git a/app/models/scheme.rb b/app/models/scheme.rb index 392a9458c..824efc6ee 100644 --- a/app/models/scheme.rb +++ b/app/models/scheme.rb @@ -68,7 +68,7 @@ class Scheme < ApplicationRecord scope :deactivating_soon, lambda { |date = Time.zone.now| merge(SchemeDeactivationPeriod.deactivations_without_reactivation) - .where("scheme_deactivation_periods.deactivation_date > ? AND scheme_deactivation_periods.deactivation_date < ? ", date, 6.months.from_now) + .where("scheme_deactivation_periods.deactivation_date > ? AND scheme_deactivation_periods.deactivation_date < ? ", date, 6.months.from_now) .where.not(id: joins(:owning_organisation).deactivated_by_organisation.pluck(:id)) }