Sha256: 41e8aa645d465505853b2dd3b523e4e1b43843641cba358fe5db8dd43f8e31a4

Contents?: true

Size: 489 Bytes

Versions: 39

Compression:

Stored size: 489 Bytes

Contents

# encoding: utf-8
class MagicAddresses::AddressSerializer < ActiveModel::Serializer

  ## defaults
  attributes :id, :created_at, :updated_at

  ## Address - Attributes
  attributes :name, :default, :street, :street_additional, :number, :postalcode, :city, :district, :subdistrict, :state, :country

  ## Location
  attributes :latitude, :longitude
  
  ## Owner
  attributes :owner_type, :owner_id, :owner
  
  
  def owner
    { id: object.owner_id, type: object.owner_type }
  end

end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
magic_addresses-0.0.39.rc7 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.39.rc6 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.39.rc5 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.39.rc4 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.39.rc3 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.39.rc2 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.39.rc1 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.38 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.38.beta2 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.38.beta1 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.37 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.36 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.35 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.34 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.33 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.32 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.31 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.30 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.29 lib/app/serializers/magic_addresses/address_serializer.rb
magic_addresses-0.0.28 lib/app/serializers/magic_addresses/address_serializer.rb