demarches-normaliennes/app/fields/geopoint_field.rb

18 lines
235 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
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