Apply suggestions from code review

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
This commit is contained in:
Daniel O'Connor
2026-04-27 01:14:11 +09:30
committed by GitHub
parent e5ac4519db
commit 208b73c31e
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ module SearchActivities
}
}
scope :search_import, -> { where("finished <> true OR updated_at >= ?", 2.years.ago) }
scope :search_import, -> { where("finished <> true OR activities.updated_at >= ?", 2.years.ago) }
def should_index?
!finished || updated_at >= 2.years.ago

View File

@@ -16,7 +16,7 @@ module SearchPlantings
}
}
scope :search_import, -> { where("NOT (finished = true OR failed = true) OR updated_at >= ?", 2.years.ago) }
scope :search_import, -> { where("NOT (finished = true OR failed = true) OR plantings.updated_at >= ?", 2.years.ago) }
def should_index?
(!finished && !failed) || updated_at >= 2.years.ago

View File

@@ -16,7 +16,7 @@ module SearchSeeds
}
}
scope :search_import, -> { where("finished <> true OR updated_at >= ?", 2.years.ago) }
scope :search_import, -> { where("finished <> true OR seeds.updated_at >= ?", 2.years.ago) }
def should_index?
!finished || updated_at >= 2.years.ago