Use humanize instead of titleize for MR title suggestion

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-03-24 16:15:57 +02:00
parent 36ea864504
commit 394737b2cb
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ module MergeRequestsHelper
target_project_id: target_project.id, target_project_id: target_project.id,
source_branch: event.branch_name, source_branch: event.branch_name,
target_branch: target_project.repository.root_ref, target_branch: target_project.repository.root_ref,
title: event.branch_name.titleize title: event.branch_name.humanize
} }
end end

View File

@ -3,5 +3,5 @@
var mrTitle = $('#merge_request_title'); var mrTitle = $('#merge_request_title');
if(mrTitle.val().length == 0) { if(mrTitle.val().length == 0) {
mrTitle.val("#{params[:ref].titleize}"); mrTitle.val("#{params[:ref].humanize}");
} }