mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-22 22:14:57 -04:00
Allow chaining on Harvest predictions method returns
This commit is contained in:
1 parent
a8a522d09e
commit
554adf234e
2 files changed
+2
-2
No files matched your search
@@ -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