Module: CountryStateSelect
- Includes:
- Constant
- Defined in:
- lib/country_state_select/engine.rb,
lib/country_state_select.rb,
lib/country_state_select/engine3.rb,
lib/country_state_select/railtie.rb,
lib/country_state_select/version.rb,
lib/country_state_select/constant.rb
Overview
Defined Under Namespace
Modules: Constant, Rails
Constant Summary
collapse
- VERSION =
"1.0.1"
Constants included
from Constant
Constant::CANADIAN_STATES, Constant::COUNTRIES, Constant::INDIAN_STATES, Constant::INDIAN_TERRIOTORY, Constant::UK_STATES, Constant::USA_STATES
Class Method Summary
collapse
Class Method Details
.canadian_states ⇒ Object
20
21
22
|
# File 'lib/country_state_select.rb', line 20
def self.canadian_states
CANADIAN_STATES
end
|
.countries ⇒ Object
8
9
10
|
# File 'lib/country_state_select.rb', line 8
def self.countries
COUNTRIES
end
|
.countries_except(*except) ⇒ Object
this method will provide the user to opetion to skip any countries in drop down list
33
34
35
36
37
38
39
|
# File 'lib/country_state_select.rb', line 33
def self.countries_except(*except)
countries = []
COUNTRIES.each do |country|
countries<< country unless country.in?(except)
end
return countries
end
|
.uk_states ⇒ Object
24
25
26
|
# File 'lib/country_state_select.rb', line 24
def self.uk_states
UK_STATES
end
|
.us_states ⇒ Object
16
17
18
|
# File 'lib/country_state_select.rb', line 16
def self.us_states
USA_STATE_LIST
end
|