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