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:
authorRémy Coutable <remy@rymai.me>2015-09-28 17:00:53 +0300
committerrymai <remy@rymai.me>2015-09-29 22:11:51 +0300
commit5f95a5e070c76c582a2b394377b0f350f4b1cff9 (patch)
tree94ae75916155f0337b8981cab1d04e563c8e24af /app/models
parent10c036fcf59297663fd1121f7b48d1a289a2e312 (diff)
Disable the "Report abuse" button if a user has already been reported
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 3879f3fd381..a3b149ff992 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -97,7 +97,9 @@ class User < ActiveRecord::Base
# Namespace for personal projects
has_one :namespace, -> { where type: nil }, dependent: :destroy, foreign_key: :owner_id, class_name: "Namespace"
+
# Profile
+ has_one :abuse_report, dependent: :destroy
has_many :keys, dependent: :destroy
has_many :emails, dependent: :destroy
has_many :identities, dependent: :destroy, autosave: true