Use global project variable in ClustersFinder

This commit is contained in:
Matija Čupić 2017-11-27 13:59:41 +01:00
parent 48b2563e63
commit 01c9d8fe5d
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 3 additions and 3 deletions

View File

@ -8,11 +8,11 @@ class ClustersFinder
def execute
clusters = case @scope
when :all
project.clusters
@project.clusters
when :enabled
project.clusters.enabled
@project.clusters.enabled
when :disabled
project.clusters.disabled
@project.clusters.disabled
end
clusters.map { |cluster| cluster.present(current_user: @user) }
end