11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/erp_products/extensions/active_record/acts_as_product_offer.rb', line 11
def acts_as_product_offer
extend ActsAsProductOffer::SingletonMethods
include ActsAsProductOffer::InstanceMethods
after_initialize :initialize_product_offer
after_create :save_product_offer
after_update :save_product_offer
after_destroy :destroy_product_offer
has_one :product_offer, :as => :product_offer_record
[:description, :description=, :valid_from,
:valid_from=, :valid_to, :valid_to=].each do |m|
delegate m, :to => :product_offer
end
end
|