diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/builds_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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) |