diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-09 15:41:21 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-09 15:41:21 +0200 |
commit | d516b02eb4e40aa0c5c3f4a1d5d957f5657c2426 (patch) | |
tree | aee039a1c64dadd854054034f4c3de12539981fb /app/controllers/ci | |
parent | 870f553bf3ec63d9f137afd0b67e8a338a745027 (diff) | |
download | gitlab-ce-d516b02eb4e40aa0c5c3f4a1d5d957f5657c2426.tar.gz |
Fix brakeman
Diffstat (limited to 'app/controllers/ci')
-rw-r--r-- | app/controllers/ci/admin/builds_controller.rb | 12 |
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 |