Allow chaining on Harvest predictions method returns

This commit is contained in:
Brenda Wallace
2019-11-24 10:30:56 +13:00
parent a8a522d09e
commit 554adf234e
2 changed files with 2 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ module PredictHarvest
.where.not(planting_id: nil)
end
[]
Harvest.none
end
private

View File

@@ -104,7 +104,7 @@ class Planting < ApplicationRecord
end
def nearby_same_crop
return if location.empty?
return Planting.none if location.blank?
# latitude, longitude = Geocoder.coordinates(location, params: { limit: 1 })
Planting.joins(:garden)