diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-02-16 14:35:58 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2018-02-20 15:08:24 +0300 |
commit | 336bc95e361ec51b445732129f61f82903a47fdf (patch) | |
tree | a2bc9d2c0eb64be03ff5ccbd6b5aad04bde8a597 /app/finders | |
parent | 5a5a33a9a6062bac2bded77c434cc56a4e68dac1 (diff) |
Push feature-related query part up.
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/snippets_finder.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/finders/snippets_finder.rb b/app/finders/snippets_finder.rb index 33359fa1efb..7a343faecdd 100644 --- a/app/finders/snippets_finder.rb +++ b/app/finders/snippets_finder.rb @@ -56,8 +56,7 @@ class SnippetsFinder < UnionFinder end def feature_available_projects - projects = Project.public_or_visible_to_user(current_user) - .with_feature_available_for_user(:snippets, current_user).select(:id) + projects = Project.public_or_visible_to_user_with_feature_available(current_user, :snippets).select(:id) arel_query = Arel::Nodes::SqlLiteral.new(projects.to_sql) table[:project_id].in(arel_query) end |