Sha256: 97db7e2491792b931ea88f719eb06e4386cd94080f6f80384025fe5b110f8e4e

Contents?: true

Size: 350 Bytes

Versions: 15

Compression:

Stored size: 350 Bytes

Contents

class Country < ActiveRecord::Base
  has_many :states
  
  has_one     :zone_member, :as => :zoneable
  has_one     :zone,        :through => :zone_member

  named_scope :order_by_name, :order => :name  
  validates_presence_of :name  
  validates_presence_of :iso_name
  
  def <=>(other)
    name <=> other.name
  end

  def to_s
    name
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
spree-0.11.4 app/models/country.rb
spree-0.11.3 app/models/country.rb
spree-0.11.2 app/models/country.rb
spree-0.11.1 app/models/country.rb
spree-0.11.0 app/models/country.rb
spree-0.10.2 app/models/country.rb
spree-0.10.1 app/models/country.rb
spree-0.10.0 app/models/country.rb
spree-0.10.0.beta app/models/country.rb
spree-enriquez-0.9.4 app/models/country.rb
spree-0.9.4 app/models/country.rb
spree-0.9.3 app/models/country.rb
spree-0.9.2 app/models/country.rb
spree-0.9.1 app/models/country.rb
spree-0.9.0 app/models/country.rb