app/models/billing/receipt_config.rb in billing-0.1.2 vs app/models/billing/receipt_config.rb in billing-0.1.3
- old
+ new
@@ -1,5 +1,6 @@
module Billing
class ReceiptConfig < ActiveRecord::Base
- has_many :origins, inverse_of: :receipt_config
+ has_many :origins, inverse_of: :receipt_config, dependent: :restrict_with_exception
+ validates :name, presence: true, uniqueness: { scope: :master_id }
end
end