Use strings for @scope in ClustersController#index
This commit is contained in:
parent
85e4e70d34
commit
976e22e675
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ class Projects::ClustersController < Projects::ApplicationController
|
|||
before_action :authorize_admin_cluster!, only: [:destroy]
|
||||
|
||||
def index
|
||||
@scope = params[:scope] || :all
|
||||
@scope = params[:scope] || 'all'
|
||||
clusters = ClustersFinder.new(project, current_user, @scope).execute
|
||||
@clusters = clusters.page(params[:page]).per(20)
|
||||
@active_count = project.clusters.enabled.count
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- @clusters.each do |cluster|
|
||||
= render "cluster", cluster: cluster
|
||||
= paginate @clusters, theme: "gitlab"
|
||||
- elsif @scope == :all
|
||||
- elsif @scope == 'all'
|
||||
= render "empty_state"
|
||||
- else
|
||||
= render "tabs"
|
||||
|
|
Loading…
Reference in a new issue