Class: Hood
- Inherits:
-
Object
- Object
- Hood
- Includes:
- Geopolitocracy, Mongoid::Document
- Defined in:
- app/models/hood.rb
Overview
Hood/Neighborhood
Instance Method Summary collapse
Methods included from Geopolitocracy
Instance Method Details
#as_json(_opts = {}) ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/models/hood.rb', line 23 def as_json(_opts = {}) { id: id.to_s, name: name, city: city } end |
#phone ⇒ Object
15 16 17 |
# File 'app/models/hood.rb', line 15 def phone self[:phone] || city.phone end |
#postal ⇒ Object
19 20 21 |
# File 'app/models/hood.rb', line 19 def postal self[:postal] || city.postal end |