Class: Spree::Country
- Inherits:
-
Base
- Object
- ActiveRecord::Base
- Base
- Spree::Country
show all
- Defined in:
- app/models/spree/country.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
page
#clear_preferences, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference
Class Method Details
.states_required_by_country_id ⇒ Object
8
9
10
11
12
|
# File 'app/models/spree/country.rb', line 8
def self.states_required_by_country_id
states_required = Hash.new(true)
all.each { |country| states_required[country.id.to_s]= country.states_required }
states_required
end
|
Instance Method Details
#<=>(other) ⇒ Object
14
15
16
|
# File 'app/models/spree/country.rb', line 14
def <=>(other)
name <=> other.name
end
|
#to_s ⇒ Object
18
19
20
|
# File 'app/models/spree/country.rb', line 18
def to_s
name
end
|