diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-08 23:32:57 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-08 23:32:57 -0800 |
commit | 1f838a4f98fafa80ae5cfd7759b883b00870072f (patch) | |
tree | 0196d496ed5cb94a2be19114fe73771b5a77663f | |
parent | 572ca2fd9cc267280e575578675c978f7ebf8fef (diff) | |
parent | 7f7b58fc854a80a1b1e396114c4c9dcbdf303c53 (diff) | |
download | gitlab-ci-1f838a4f98fafa80ae5cfd7759b883b00870072f.tar.gz |
Merge pull request #353 from pgolm/fix/admin_runner_controller
fix some refactore issues in Admin::RunnersController
-rw-r--r-- | app/controllers/admin/runners_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 609d591..a1d9268 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -7,7 +7,6 @@ class Admin::RunnersController < Admin::ApplicationController end def show - @runner = Runner.find(params[:id]) @builds = @runner.builds.order('id DESC').first(30) end @@ -16,14 +15,14 @@ class Admin::RunnersController < Admin::ApplicationController respond_to do |format| format.js - format.html { redirect_to runners_path } + format.html { redirect_to admin_runners_path } end end def destroy - Runner.find(params[:id]).destroy + @runner.destroy - redirect_to runners_path + redirect_to admin_runners_path end def assign_all @@ -31,7 +30,7 @@ class Admin::RunnersController < Admin::ApplicationController respond_to do |format| format.js - format.html { redirect_to runners_path, notice: "Runner was assigned to all projects" } + format.html { redirect_to admin_runners_path, notice: "Runner was assigned to all projects" } end end |