mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 08:52:14 -04:00
Apply suggestions from code review
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user