diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-04-23 16:58:59 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-04-23 16:58:59 +0300 |
commit | 551f8c4b1a04fc0d2c8246fae5782a0c121ddfc0 (patch) | |
tree | ef2ef18e92b45c11809c5890255cd5cc6a15303e /app/controllers/projects/pipelines_controller.rb | |
parent | e0b7541b9aa1f107d024803e96e8dda9b9fb7978 (diff) |
Add proper stage.json data
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 78d109cf33e..ef699e885b8 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -104,9 +104,9 @@ class Projects::PipelinesController < Projects::ApplicationController @stage = pipeline.legacy_stage(params[:stage]) return not_found unless @stage - respond_to do |format| - format.json { render json: { html: view_to_html_string('projects/pipelines/_stage') } } - end + render json: StageSerializer + .new(project: @project, current_user: @current_user) + .represent(@pipeline) end def retry |