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.1.3 app/models/effective/product.rb
effective_orders-4.1.2 app/models/effective/product.rb
effective_orders-4.1.1 app/models/effective/product.rb
effective_orders-4.1.0 app/models/effective/product.rb
effective_orders-4.0.6 app/models/effective/product.rb
effective_orders-4.0.5 app/models/effective/product.rb
effective_orders-4.0.4 app/models/effective/product.rb
effective_orders-4.0.3 app/models/effective/product.rb
effective_orders-4.0.2 app/models/effective/product.rb
effective_orders-4.0.1 app/models/effective/product.rb
effective_orders-4.0.0 app/models/effective/product.rb
effective_orders-4.0.0beta19 app/models/effective/product.rb
effective_orders-4.0.0beta18 app/models/effective/product.rb
effective_orders-4.0.0beta17 app/models/effective/product.rb
effective_orders-4.0.0beta16 app/models/effective/product.rb
effective_orders-4.0.0beta15 app/models/effective/product.rb
effective_orders-4.0.0beta14 app/models/effective/product.rb
effective_orders-4.0.0beta13 app/models/effective/product.rb
effective_orders-4.0.0beta12 app/models/effective/product.rb
effective_orders-4.0.0beta11 app/models/effective/product.rb