diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-02 12:34:40 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-02 12:34:40 +0000 |
commit | 46fd31594e166b17d1c0ca232b6acdd09c1b1cdb (patch) | |
tree | 28a50ec6870fb9eb977116079efe789a419f4306 /app/finders | |
parent | 473262a04b098396c0633436c0e9572561d332c7 (diff) | |
parent | fec21f5542b4b50cb1e49a6c50c8b4d57fa9f62e (diff) | |
download | gitlab-ce-46fd31594e166b17d1c0ca232b6acdd09c1b1cdb.tar.gz |
Merge branch 'top_level_clusters_controller' into 'master'
Top level clusters controller
See merge request gitlab-org/gitlab-ce!22438
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/clusters_finder.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/finders/clusters_finder.rb b/app/finders/clusters_finder.rb index b40d6c41b71..0cce493b73e 100644 --- a/app/finders/clusters_finder.rb +++ b/app/finders/clusters_finder.rb @@ -1,20 +1,20 @@ # frozen_string_literal: true class ClustersFinder - def initialize(project, user, scope) - @project = project + def initialize(clusterable, user, scope) + @clusterable = clusterable @user = user @scope = scope || :active end def execute - clusters = project.clusters + clusters = clusterable.clusters filter_by_scope(clusters) end private - attr_reader :project, :user, :scope + attr_reader :clusterable, :user, :scope def filter_by_scope(clusters) case scope.to_sym |