Serialize pipelines in the new merge request action

This commit is contained in:
Grzegorz Bizon 2017-02-01 19:20:08 +01:00 committed by Filipa Lacerda
parent 45966b0abc
commit 921141aebd
1 changed files with 8 additions and 1 deletions

View File

@ -224,7 +224,14 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def new
define_new_vars
respond_to do |format|
format.html { define_new_vars }
format.json do
render json: { pipelines: PipelineSerializer
.new(project: @project, user: @current_user)
.represent(@pipelines) }
end
end
end
def new_diffs