Soft-delete enterprise fees

These objects can hold critical information related to adjustments and tax categories. If they are hard-deleted we lose vital data that's needed by associated records.
This commit is contained in:
Matt-Yorkley
2021-01-15 14:41:59 +00:00
parent b84fb5814e
commit c4a8a38c8d
3 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
class EnterpriseFee < ActiveRecord::Base
include Spree::Core::CalculatedAdjustments
acts_as_paranoid
belongs_to :enterprise
belongs_to :tax_category, class_name: 'Spree::TaxCategory', foreign_key: 'tax_category_id'