summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-03-05 18:23:42 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-03-05 18:53:00 +0100
commit91ce04678ea78f2042026e8584e5d1069853dbc4 (patch)
treed26addff8e83b10704ea67ba2c1cd460adf4b9ea /app/models/user.rb
parent0a75de2909152351483b317024fcab2e9bb08e16 (diff)
downloadgitlab-ce-91ce04678ea78f2042026e8584e5d1069853dbc4.tar.gz
Make triggers to be user aware
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index d3bb04060bf..dfba51d3b00 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -95,6 +95,7 @@ class User < ActiveRecord::Base
has_many :todos, dependent: :destroy
has_many :notification_settings, dependent: :destroy
has_many :award_emoji, dependent: :destroy
+ has_many :triggers, dependent: :destroy, class_name: 'Ci::Trigger', foreign_key: :owner_id
has_many :assigned_issues, dependent: :nullify, foreign_key: :assignee_id, class_name: "Issue"
has_many :assigned_merge_requests, dependent: :nullify, foreign_key: :assignee_id, class_name: "MergeRequest"