Class: OfficeSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/office_serializer.rb

Instance Method Summary collapse

Instance Method Details

#_idObject



8
9
10
# File 'app/serializers/office_serializer.rb', line 8

def _id
  object.id
end

#locationObject



12
13
14
15
16
17
# File 'app/serializers/office_serializer.rb', line 12

def location
  {
    lat: object.latitude,
    lon: object.longitude
  }
end