Sha256: 77fcf001326283500459ba7f773977c349850211fd8e75a169268c8764420b8e
Contents?: true
Size: 565 Bytes
Versions: 38
Compression:
Stored size: 565 Bytes
Contents
module Effective class Product < ActiveRecord::Base self.table_name = (EffectiveOrders.products_table_name || :products).to_s acts_as_purchasable log_changes if respond_to?(:log_changes) effective_resource do name :string qb_item_name :string price :integer tax_exempt :boolean timestamps end 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
38 entries across 38 versions & 1 rubygems