Class: Spree::State

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_all_by_name_or_abbr(name_or_abbr) ⇒ Object



10
11
12
# File 'app/models/spree/state.rb', line 10

def self.find_all_by_name_or_abbr(name_or_abbr)
  where("name = ? OR abbr = ?", name_or_abbr, name_or_abbr)
end

Instance Method Details

#<=>(other) ⇒ Object



14
15
16
# File 'app/models/spree/state.rb', line 14

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

#to_sObject



18
19
20
# File 'app/models/spree/state.rb', line 18

def to_s
  name
end