Quick change to ensure geocoding call when latitude is absent
This commit is contained in:
parent
06c654c348
commit
0723960f7b
@ -28,7 +28,7 @@ class Event < ApplicationRecord
|
|||||||
|
|
||||||
geocoded_by :full_address
|
geocoded_by :full_address
|
||||||
after_validation :geocode, if: (lambda do |obj|
|
after_validation :geocode, if: (lambda do |obj|
|
||||||
obj.address_changed? || obj.city_changed?
|
obj.address_changed? || obj.city_changed? || latitude.nil?
|
||||||
end)
|
end)
|
||||||
|
|
||||||
# Mechanism to store some reason which can be used when sending notifications
|
# Mechanism to store some reason which can be used when sending notifications
|
||||||
|
Loading…
Reference in New Issue
Block a user