Browse Source

Quick change to ensure geocoding call when latitude is absent

remotes/origin/master
echarp 3 years ago
parent
commit
0723960f7b
  1. 2
      app/models/event.rb

2
app/models/event.rb

@ -28,7 +28,7 @@ class Event < ApplicationRecord
geocoded_by :full_address
after_validation :geocode, if: (lambda do |obj|
obj.address_changed? || obj.city_changed?
obj.address_changed? || obj.city_changed? || latitude.nil?
end)
# Mechanism to store some reason which can be used when sending notifications

Loading…
Cancel
Save