From 7d0fe1f04ed285e7e5cf825a305114b3e981c2f8 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 18:39:58 +0200 Subject: Add implementation of manual actions --- app/controllers/projects/builds_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/controllers/projects/builds_controller.rb') diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index d7513d75f01..597cfa93712 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -57,6 +57,15 @@ class Projects::BuildsController < Projects::ApplicationController redirect_to build_path(build) end + def play + unless @build.playable? + return render_404 + end + + build = @build.play(current_user) + redirect_to build_path(build) + end + def cancel @build.cancel redirect_to build_path(@build) -- cgit v1.2.1