Sha256: a0daed253cc796a1056a9ca476ab22c50c10a04ea047cf9636f97a838ebf3581

Contents?: true

Size: 327 Bytes

Versions: 9

Compression:

Stored size: 327 Bytes

Contents

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

  scope :order_by_name, :order => :name  
  validates :name, :iso_name, :presence => true
  
  def <=>(other)
    name <=> other.name
  end

  def to_s
    name
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_core-0.30.2 app/models/country.rb
spree_core-0.40.4 app/models/country.rb
spree_core-0.40.3 app/models/country.rb
spree_core-0.40.2 app/models/country.rb
spree_core-0.40.1 app/models/country.rb
spree_core-0.40.0 app/models/country.rb
spree_core-0.30.1 app/models/country.rb
spree_core-0.30.0 app/models/country.rb
spree_core-0.30.0.beta1 app/models/country.rb