Class: AddressSerializer
- Inherits:
-
ActiveModel::Serializer
- Object
- ActiveModel::Serializer
- AddressSerializer
- Defined in:
- app/serializers/address_serializer.rb
Instance Method Summary collapse
Instance Method Details
#country ⇒ Object
7 8 9 |
# File 'app/serializers/address_serializer.rb', line 7 def country object.country.try(:iso) end |
#state ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/serializers/address_serializer.rb', line 11 def state if object.state object.state.abbr else object.state_name end end |