mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-05 15:11:01 -05:00
Make the month an int
This commit is contained in:
@@ -57,7 +57,7 @@ module PredictHarvest
|
||||
def harvest_months
|
||||
Rails.cache.fetch("#{cache_key_with_version}/harvest_months", expires_in: 5.minutes) do
|
||||
neighbours_for_harvest_predictions.where.not(harvested_at: nil)
|
||||
.group("extract(MONTH from harvested_at)")
|
||||
.group("extract(MONTH from harvested_at)::int")
|
||||
.count
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user