diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-11-18 11:58:01 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-11-18 11:58:01 +0100 |
commit | 53b285c9a8b7eec9ee10906ef519da376347b69e (patch) | |
tree | e3fa4f337112cedb08343e7d3ea85ecc1f48fb1d /app/controllers/projects/merge_requests_controller.rb | |
parent | 2f048df4a4a83ff009d2ef2d14ee04e5a2798618 (diff) | |
parent | 21a59b23fe4d8bc4331f746c75f9242a49d75faa (diff) | |
download | gitlab-ce-53b285c9a8b7eec9ee10906ef519da376347b69e.tar.gz |
Merge branch 'master' into merge-if-green
Diffstat (limited to 'app/controllers/projects/merge_requests_controller.rb')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 931298df5d8..9db6ed5022d 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -31,6 +31,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController end @merge_requests = @merge_requests.page(params[:page]).per(PER_PAGE) + @merge_requests = @merge_requests.preload(:target_project) respond_to do |format| format.html @@ -294,11 +295,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController end def merge_request_params - params.require(:merge_request).permit( + permitted = params.require(:merge_request).permit( :title, :assignee_id, :source_project_id, :source_branch, :target_project_id, :target_branch, :milestone_id, :state_event, :description, :task_num, label_ids: [] ) + params[:merge_request][:title].strip! if params[:merge_request][:title] + permitted end def merge_params |