Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-11-30 18:41:07 +0300
committerMatija Čupić <matteeyah@gmail.com>2017-11-30 18:41:07 +0300
commit976e22e6757e376c6702a1e3b93f3f7e8ac448cd (patch)
tree70d59656982721b75a0d7b41a98ccfb76bfa9302
parent85e4e70d34592cc94ed70a9e7d3f3e8e3489fd1a (diff)
Use strings for @scope in ClustersController#index
-rw-r--r--app/controllers/projects/clusters_controller.rb2
-rw-r--r--app/views/projects/clusters/index.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb
index 48c88bc9b0d..c24b413b51e 100644
--- a/app/controllers/projects/clusters_controller.rb
+++ b/app/controllers/projects/clusters_controller.rb
@@ -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
diff --git a/app/views/projects/clusters/index.html.haml b/app/views/projects/clusters/index.html.haml
index 958b6f08ee0..4dd956971ae 100644
--- a/app/views/projects/clusters/index.html.haml
+++ b/app/views/projects/clusters/index.html.haml
@@ -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"