Sha256: de41bb0ae5cdff31fceaf0ac3598ec9bc7e5148ad8f773812e14b9965a8677a4

Contents?: true

Size: 295 Bytes

Versions: 4

Compression:

Stored size: 295 Bytes

Contents

module Shoppe
  class Country < ActiveRecord::Base

    # Set the table name
    self.table_name = 'shoppe_countries'

    # Relationships
    has_many :orders, :dependent => :restrict_with_exception
    
    # Scopes
    scope :ordered, -> { order('shoppe_countries.name asc') }
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoppe-0.0.14 app/models/shoppe/country.rb
shoppe-0.0.13 app/models/shoppe/country.rb
shoppe-0.0.12 app/models/shoppe/country.rb
shoppe-0.0.11 app/models/shoppe/country.rb