Use strings for @scope in ClustersController#index

This commit is contained in:
Matija Čupić 2017-11-30 16:41:07 +01:00
parent 85e4e70d34
commit 976e22e675
No known key found for this signature in database
GPG key ID: 4BAF84FFACD2E5DE
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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"