diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-06 21:09:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-06 21:09:41 +0300 |
commit | 37419c44f04cd802ac89fe2d54b8501a0718a5e3 (patch) | |
tree | 7ff8770bf860a7aed343aa08fae8caa11c65e10d /app/models/merge_request | |
parent | 5f4dec4ac396f844fa55ecd9a8563a0348872ef6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/merge_request')
-rw-r--r-- | app/models/merge_request/metrics.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/merge_request/metrics.rb b/app/models/merge_request/metrics.rb index f679beabf94..66bff3f5982 100644 --- a/app/models/merge_request/metrics.rb +++ b/app/models/merge_request/metrics.rb @@ -8,6 +8,9 @@ class MergeRequest::Metrics < ApplicationRecord before_save :ensure_target_project_id + scope :merged_after, ->(date) { where(arel_table[:merged_at].gteq(date)) } + scope :merged_before, ->(date) { where(arel_table[:merged_at].lteq(date)) } + private def ensure_target_project_id |