Class: PhilLocator::Region
- Inherits:
-
ActiveYaml::Base
- Object
- ActiveYaml::Base
- PhilLocator::Region
- Includes:
- ActiveHash::Associations
- Defined in:
- app/models/phil_locator/region.rb
Instance Method Summary collapse
Instance Method Details
#alias ⇒ Object
12 13 14 |
# File 'app/models/phil_locator/region.rb', line 12 def alias self[:name].split("(").last.strip.gsub(/\(|\)/, "") end |
#cities ⇒ Object
16 17 18 |
# File 'app/models/phil_locator/region.rb', line 16 def cities PhilLocator::City.where(province_code: provinces.map(&:province_code)) end |
#municipalities ⇒ Object
20 21 22 |
# File 'app/models/phil_locator/region.rb', line 20 def municipalities PhilLocator::Municipality.where(province_code: provinces.map(&:province_code)) end |
#name ⇒ Object
24 25 26 |
# File 'app/models/phil_locator/region.rb', line 24 def name self[:name].split("(").first.delete("(").strip end |