Class: Location::Address
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Location::Address
- Defined in:
- app/models/location/address.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/models/location/address.rb', line 13 def to_hash { postal_code: self.postal_code, street: self.street, number: self.number, complement: self.complement, district: self.district.try(:name), city: self.city.try(:name), state: self.state.try(:name) } end |