mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-02 13:41:00 -05:00
Allow chaining on Harvest predictions method returns
This commit is contained in:
@@ -72,7 +72,7 @@ module PredictHarvest
|
||||
.where.not(planting_id: nil)
|
||||
end
|
||||
|
||||
[]
|
||||
Harvest.none
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user