Browse Source

Add PaperTrail to OrganisationRelationship (#1406)

pull/1397/head^2
James Rose 2 years ago committed by GitHub
parent
commit
76643694a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/models/organisation_relationship.rb

2
app/models/organisation_relationship.rb

@ -7,6 +7,8 @@ class OrganisationRelationship < ApplicationRecord
validates :child_organisation_id, uniqueness: { scope: :parent_organisation_id, message: I18n.t("validations.organisation.managing_agent.already_added") }
validate :validate_stock_owner_owns_stock, on: :stock_owner
has_paper_trail
private
def validate_stock_owner_owns_stock

Loading…
Cancel
Save