Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-12-10 00:43:02 +0300
committerMike Greiling <mike@pixelcog.com>2016-12-10 09:57:23 +0300
commita68735d4985bf5ffaeaf5a051b40f8aed0c0a6e0 (patch)
tree14171ac6a81a1e4479f6fed31d9efece61d380e8 /app/finders/snippets_finder.rb
parent687872978100c168ce381448c0a9536fb53542ce (diff)
use Snippet.none in favor of nil to allow chaining
Diffstat (limited to 'app/finders/snippets_finder.rb')
-rw-r--r--app/finders/snippets_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/snippets_finder.rb b/app/finders/snippets_finder.rb
index 31f039b5a70..78a2f8840ed 100644
--- a/app/finders/snippets_finder.rb
+++ b/app/finders/snippets_finder.rb
@@ -51,7 +51,7 @@ class SnippetsFinder
def by_scope(snippets, scope = nil, include_private = false)
case scope.to_s
when 'are_private'
- include_private ? snippets.are_private : nil
+ include_private ? snippets.are_private : Snippet.none
when 'are_internal'
snippets.are_internal
when 'are_public'