module ErpProducts::Extensions::ActiveRecord::ActsAsProductOffer::InstanceMethods
Public Instance Methods
destroy_product_offer()
click to toggle source
# File lib/erp_products/extensions/active_record/acts_as_product_offer.rb, line 47 def destroy_product_offer self.product_offer.destroy if (self.product_offer && !self.product_offer.frozen?) end
initialize_product_offer()
click to toggle source
# File lib/erp_products/extensions/active_record/acts_as_product_offer.rb, line 33 def initialize_product_offer if self.new_record? && self.product_offer.nil? product_offer = ProductOffer.new self.product_offer = product_offer product_offer.save self.save end end
save_product_offer()
click to toggle source
# File lib/erp_products/extensions/active_record/acts_as_product_offer.rb, line 42 def save_product_offer self.product_offer.description = self.description self.product_offer.save end