Expose scope to view in ClustersController#index

This commit is contained in:
Matija Čupić 2017-11-28 14:24:50 +01:00
parent 18967d6894
commit 6f72039007
No known key found for this signature in database
GPG key ID: 4BAF84FFACD2E5DE

View file

@ -9,6 +9,7 @@ class Projects::ClustersController < Projects::ApplicationController
def index
@clusters = Kaminari.paginate_array(@clusters).page(params[:page]).per(20)
@scope = params[:scope]
@active_count = project.clusters.enabled.count
@inactive_count = project.clusters.disabled.count
@all_count = @active_count + @inactive_count