Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/customer_relations/contact.rb')
-rw-r--r--app/models/customer_relations/contact.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/customer_relations/contact.rb b/app/models/customer_relations/contact.rb
index 16c741d340f..f99b8fa5549 100644
--- a/app/models/customer_relations/contact.rb
+++ b/app/models/customer_relations/contact.rb
@@ -35,6 +35,22 @@ class CustomerRelations::Contact < ApplicationRecord
scope :order_by_organization_asc, -> { includes(:organization).order("customer_relations_organizations.name ASC NULLS LAST") }
scope :order_by_organization_desc, -> { includes(:organization).order("customer_relations_organizations.name DESC NULLS LAST") }
+ SAFE_ATTRIBUTES = %w[
+ created_at
+ description
+ first_name
+ group_id
+ id
+ last_name
+ organization_id
+ state
+ updated_at
+ ].freeze
+
+ def hook_attrs
+ attributes.slice(*SAFE_ATTRIBUTES)
+ end
+
def self.reference_prefix
'[contact:'
end