Sha256: 28f4752276771fbabb032bb66edc42205cea667a2b63cbf67f14090f23ab5885

Contents?: true

Size: 492 Bytes

Versions: 66

Compression:

Stored size: 492 Bytes

Contents

module Effective
  class Product < ActiveRecord::Base
    self.table_name = EffectiveOrders.products_table_name.to_s

    acts_as_purchasable

    # Attributes
    # name          :string
    # price         :integer, default: 0
    # tax_exempt    :boolean, default: false
    #
    # timestamps

    validates :name, presence: true
    validates :price, presence: true
    validates :tax_exempt, inclusion: { in: [true, false] }

    def to_s
      name || 'New Product'
    end

  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
effective_orders-4.6.3 app/models/effective/product.rb
effective_orders-4.6.2 app/models/effective/product.rb
effective_orders-4.6.0 app/models/effective/product.rb
effective_orders-4.5.12 app/models/effective/product.rb
effective_orders-4.5.11 app/models/effective/product.rb
effective_orders-4.5.10 app/models/effective/product.rb
effective_orders-4.5.9 app/models/effective/product.rb
effective_orders-4.5.8 app/models/effective/product.rb
effective_orders-4.5.7 app/models/effective/product.rb
effective_orders-4.5.6 app/models/effective/product.rb
effective_orders-4.5.5 app/models/effective/product.rb
effective_orders-4.5.4 app/models/effective/product.rb
effective_orders-4.5.3 app/models/effective/product.rb
effective_orders-4.5.2 app/models/effective/product.rb
effective_orders-4.5.1 app/models/effective/product.rb
effective_orders-4.5.0 app/models/effective/product.rb
effective_orders-4.4.10 app/models/effective/product.rb
effective_orders-4.4.9 app/models/effective/product.rb
effective_orders-4.4.8 app/models/effective/product.rb
effective_orders-4.4.7 app/models/effective/product.rb