Skip to content

Commit e0194e6

Browse files
authored
Merge pull request #521 from wri/fix/missing-relations-from-user-model
We should not allow to destroy user when having associations
2 parents de763e4 + ed35c26 commit e0194e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/models/user.rb

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class User < ApplicationRecord
5252
has_many :modified_observations, inverse_of: :modified_user, class_name: "Observation", dependent: :restrict_with_error
5353
has_many :observation_reports, inverse_of: :user, dependent: :restrict_with_error
5454
has_many :operator_document_annexes, inverse_of: :user, dependent: :restrict_with_error
55+
has_many :operator_documents, inverse_of: :user, dependent: :restrict_with_error
56+
has_many :operator_document_histories, inverse_of: :user, dependent: :restrict_with_error
57+
has_many :gov_documents, inverse_of: :user, dependent: :restrict_with_error
5558
has_many :qc1_observers, inverse_of: :responsible_qc1, class_name: "Observer", dependent: :nullify
5659
has_many :qc2_observers, inverse_of: :responsible_qc2, class_name: "Observer", dependent: :nullify
5760

0 commit comments

Comments
 (0)