Sha256: eb4bbdff624a1fd77c3b1950f4c5ed7c1adfd1162821601559262db661557863
Contents?: true
Size: 474 Bytes
Versions: 2
Compression:
Stored size: 474 Bytes
Contents
module Comable class OrderDetail < ActiveRecord::Base include Decoratable belongs_to :stock, class_name: Comable::Stock.name, foreign_key: Comable::Stock.table_name.singularize.foreign_key belongs_to :order_delivery, class_name: Comable::OrderDelivery.name, foreign_key: Comable::OrderDelivery.table_name.singularize.foreign_key after_create :decrement_quantity! delegate :decrement_quantity!, to: :stock delegate :product, to: :stock end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
comable-0.0.2 | app/models/comable/order_detail.rb |
comable-0.0.1 | app/models/comable/order_detail.rb |