Class: Spree::Country

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/spree/country.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.states_required_by_country_idObject



9
10
11
12
13
# File 'app/models/spree/country.rb', line 9

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



15
16
17
# File 'app/models/spree/country.rb', line 15

def <=>(other)
  name <=> other.name
end

#to_sObject



19
20
21
# File 'app/models/spree/country.rb', line 19

def to_s
  name
end