Gestion simplifiée du geocoding
This commit is contained in:
parent
55d2870b6d
commit
dadb6cd521
@ -17,7 +17,8 @@ class Event < ActiveRecord::Base
|
|||||||
validates :submitter, email: true
|
validates :submitter, email: true
|
||||||
|
|
||||||
geocoded_by :full_address, lookup: :nominatim
|
geocoded_by :full_address, lookup: :nominatim
|
||||||
after_validation :geocode, if: -> (obj) { obj.address_changed? }
|
# after_validation :geocode, if: -> (obj) { obj.address_changed? }
|
||||||
|
after_validation :geocode
|
||||||
|
|
||||||
scope :moderated, -> { where moderated: true }
|
scope :moderated, -> { where moderated: true }
|
||||||
scope :unmoderated, -> { where moderated: false }
|
scope :unmoderated, -> { where moderated: false }
|
||||||
|
@ -50,6 +50,7 @@ fr:
|
|||||||
start_time: Début
|
start_time: Début
|
||||||
end_time: Fin
|
end_time: Fin
|
||||||
description: Description
|
description: Description
|
||||||
|
address: Adresse
|
||||||
city: Ville
|
city: Ville
|
||||||
related_region: Région
|
related_region: Région
|
||||||
locality: Portée
|
locality: Portée
|
||||||
|
Loading…
Reference in New Issue
Block a user