Sha256: c0fe0c38af22c317910f3f2e3d5db401cec5e33f9bfb2edd2a6e3d6c504d31da
Contents?: true
Size: 501 Bytes
Versions: 18
Compression:
Stored size: 501 Bytes
Contents
module Effective class Product < ActiveRecord::Base self.table_name = EffectiveOrders.products_table_name.to_s acts_as_purchasable # Attributes # title :string # price :integer, default: 0 # tax_exempt :boolean, default: false # # timestamps validates :title, presence: true validates :price, presence: true validates :tax_exempt, inclusion: { in: [true, false] } def to_s self[:title] || 'New Product' end end end
Version data entries
18 entries across 18 versions & 1 rubygems