Destroy adjustment metadata when adjustment is destroyed

This commit is contained in:
Rohan Mitchell
2014-04-03 11:19:05 +11:00
parent e792107d7b
commit a91ea933cc

View File

@@ -1,6 +1,6 @@
module Spree
Adjustment.class_eval do
has_one :metadata, class_name: 'AdjustmentMetadata'
has_one :metadata, class_name: 'AdjustmentMetadata', dependent: :destroy
scope :enterprise_fee, where(originator_type: 'EnterpriseFee')
end