diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-26 18:08:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-26 18:08:45 +0300 |
commit | 2a53c24c512db8613255884b1db42402a31d831b (patch) | |
tree | 37831911612043071365082fb0838c671ec7bbb7 /app/models/snippet.rb | |
parent | 8e812185ddf4c77ae3b1512b2d04725190e64209 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 079b4b2baf4..21a9325104d 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -79,6 +79,7 @@ class Snippet < ApplicationRecord scope :fresh, -> { order("created_at DESC") } scope :inc_author, -> { includes(:author) } scope :inc_relations_for_view, -> { includes(author: :status) } + scope :with_statistics, -> { joins(:statistics) } attr_mentionable :description |