summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-12-09 15:43:02 -0600
committerMike Greiling <mike@pixelcog.com>2016-12-10 00:57:23 -0600
commita68735d4985bf5ffaeaf5a051b40f8aed0c0a6e0 (patch)
tree14171ac6a81a1e4479f6fed31d9efece61d380e8
parent687872978100c168ce381448c0a9536fb53542ce (diff)
downloadgitlab-ce-a68735d4985bf5ffaeaf5a051b40f8aed0c0a6e0.tar.gz
use Snippet.none in favor of nil to allow chaining
-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'