Sha256: 98305d838c853dabf39fc2bc35bb1979961723f41c544c74f2581acfa5b8392e
Contents?: true
Size: 550 Bytes
Versions: 26
Compression:
Stored size: 550 Bytes
Contents
module Effective class Product < ActiveRecord::Base self.table_name = EffectiveOrders.products_table_name.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
26 entries across 26 versions & 1 rubygems