summaryrefslogtreecommitdiff
path: root/app/models/milestone.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 09:07:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 09:07:33 +0000
commitc0d8f9f3f962df6bfcc70440432da55d67307189 (patch)
tree457666705fbbd4f517d201680113406163829fcc /app/models/milestone.rb
parent2cfa1fc75dd4bd6d1f70d5fee1a824410694f297 (diff)
downloadgitlab-ce-c0d8f9f3f962df6bfcc70440432da55d67307189.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r--app/models/milestone.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index 987373aaf1b..920c28aeceb 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -38,6 +38,9 @@ class Milestone < ApplicationRecord
has_many :merge_requests
has_many :events, as: :target, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent
+ has_many :issue_milestones
+ has_many :merge_request_milestones
+
scope :of_projects, ->(ids) { where(project_id: ids) }
scope :of_groups, ->(ids) { where(group_id: ids) }
scope :active, -> { with_state(:active) }