summaryrefslogtreecommitdiff
path: root/app/models/snippet.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-08-01 15:21:24 +0000
committerRémy Coutable <remy@rymai.me>2018-08-01 15:21:24 +0000
commit83a0db0c551236518bdec1a7ae3a1ed1d05f5aaa (patch)
treee13ad022ea223e7bde5202a31ee81169225fec99 /app/models/snippet.rb
parentea6fc714bb0306ac8ca56b5dafe4b6777aafe5fc (diff)
parent12095251c3777c5231cab97854d5dca69d31cc5d (diff)
downloadgitlab-ce-83a0db0c551236518bdec1a7ae3a1ed1d05f5aaa.tar.gz
Merge branch 'bvl-user-status-message-35463' into 'master'
Allow users to set a status Closes #35463 See merge request gitlab-org/gitlab-ce!20614
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 644120453cf..390bdbf838a 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -49,6 +49,7 @@ class Snippet < ActiveRecord::Base
scope :are_public, -> { where(visibility_level: Snippet::PUBLIC) }
scope :public_and_internal, -> { where(visibility_level: [Snippet::PUBLIC, Snippet::INTERNAL]) }
scope :fresh, -> { order("created_at DESC") }
+ scope :inc_relations_for_view, -> { includes(author: :status) }
participant :author
participant :notes_with_associations