Module: CountriesRegionsAndCitiesByPete
- Defined in:
- lib/railtie.rb,
lib/countries_regions_and_cities_by_pete.rb,
lib/countries_regions_and_cities_by_pete/version.rb
Overview
require ‘countries_regions_and_cities_by_peterconsuegra’ require ‘rails’
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.3.5"
Class Method Summary collapse
-
.get_all_countries ⇒ Object
Your code goes here…
- .get_cities(selected_region, selected_country) ⇒ Object
- .get_regions(selected_country) ⇒ Object
Class Method Details
.get_all_countries ⇒ Object
Your code goes here…
15 16 17 |
# File 'lib/countries_regions_and_cities_by_pete.rb', line 15 def self.get_all_countries return Carmen::Country::all end |
.get_cities(selected_region, selected_country) ⇒ Object
24 25 26 |
# File 'lib/countries_regions_and_cities_by_pete.rb', line 24 def self.get_cities(selected_region,selected_country) CS.cities(selected_region,selected_country) end |
.get_regions(selected_country) ⇒ Object
19 20 21 22 |
# File 'lib/countries_regions_and_cities_by_pete.rb', line 19 def self.get_regions(selected_country) country = Carmen::Country.coded(selected_country) return country.subregions if country end |