demarches-normaliennes/app/fields/geopoint_field.rb

15 lines
204 B
Ruby

require "administrate/field/base"
class GeopointField < Administrate::Field::Base
def lat
data.first
end
def lng
data.last
end
def present?
lat.present? && lng.present?
end
end