For API compatibility still generate path from name if only name provided

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-12-22 17:09:48 +02:00
parent d0b1bc222e
commit fb7be3238d
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
1 changed files with 8 additions and 1 deletions

View File

@ -13,8 +13,15 @@ module Projects
end
# Set project name from path
unless @project.name.present?
if @project.name.present? && @project.path.present?
# if both name and path set - everything is ok
elsif @project.path.present?
# Set project name from path
@project.name = @project.path.dup
elsif @project.name.present?
# For compatibility - set path from name
# TODO: remove this in 8.0
@project.path = @project.name.dup.parameterize
end
# get namespace id