summaryrefslogtreecommitdiff
path: root/app/controllers/ci
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-09 15:41:21 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-09 15:41:21 +0200
commitd516b02eb4e40aa0c5c3f4a1d5d957f5657c2426 (patch)
treeaee039a1c64dadd854054034f4c3de12539981fb /app/controllers/ci
parent870f553bf3ec63d9f137afd0b67e8a338a745027 (diff)
downloadgitlab-ce-d516b02eb4e40aa0c5c3f4a1d5d957f5657c2426.tar.gz
Fix brakeman
Diffstat (limited to 'app/controllers/ci')
-rw-r--r--app/controllers/ci/admin/builds_controller.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/ci/admin/builds_controller.rb b/app/controllers/ci/admin/builds_controller.rb
index 8fc776dd98e..38abfdeafbf 100644
--- a/app/controllers/ci/admin/builds_controller.rb
+++ b/app/controllers/ci/admin/builds_controller.rb
@@ -4,9 +4,15 @@ module Ci
@scope = params[:scope]
@builds = Ci::Build.order('created_at DESC').page(params[:page]).per(30)
- if ["pending", "running"].include? @scope
- @builds = @builds.send(@scope)
- end
+ @builds =
+ case @scope
+ when "pending"
+ @builds.pending
+ when "running"
+ @builds.running
+ else
+ @builds
+ end
end
end
end