Sha256: a03b696dcd354fe29d999ad5f731a6e6ae5d1f154ba7b2f9bf1e5a9c9d8ebad7
Contents?: true
Size: 475 Bytes
Versions: 1
Compression:
Stored size: 475 Bytes
Contents
module Gemgento module Bundle # @author Gemgento LLC class Item < ActiveRecord::Base enum price_type: { fixed: 0, percent: 1 } belongs_to :option, class_name: 'Gemgento::Bundle::Option', foreign_key: :bundle_option_id belongs_to :product, class_name: 'Gemgento::Product' touch :option, after_touch: :after_touch validates :option, :product, presence: true validates :product, uniqueness: { scope: :product } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gemgento-2.8.0 | app/models/gemgento/bundle/item.rb |