spec/dummy/app/models/api_subject.rb in aaf-gumboot-1.1.0 vs spec/dummy/app/models/api_subject.rb in aaf-gumboot-1.2.0
- old
+ new
@@ -3,11 +3,11 @@
require 'accession'
class APISubject < ApplicationRecord
include Accession::Principal
- has_many :api_subject_roles
- has_many :roles, through: :api_subject_roles
+ has_many :api_subject_roles, dependent: :destroy
+ has_many :roles, through: :api_subject_roles, dependent: :destroy
valhammer
validates :x509_cn, format: { with: /\A[\w-]+\z/ }
def permissions