diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-08 13:41:03 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-08 13:41:03 +0200 |
commit | bd08ac55c7b8eb1b41862937aa4f7cc7a53e4bfe (patch) | |
tree | 284a3d5206f1fdb4784ebac6fce3b8570a5a47f1 /app/helpers | |
parent | 17156cf909fff49ea068b2dc00fd607af20967f8 (diff) | |
download | gitlab-ce-bd08ac55c7b8eb1b41862937aa4f7cc7a53e4bfe.tar.gz |
Recommend user to create README file for both empty and existing project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 74c8d4dad06..1bcd9a49527 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -259,4 +259,11 @@ module ProjectsHelper def leave_project_message(project) "Are you sure you want to leave \"#{project.name}\" project?" end + + def new_readme_path + ref = @repository.root_ref if @repository + ref ||= 'master' + + namespace_project_new_blob_path(@project.namespace, @project, tree_join(ref), file_name: 'README.md') + end end |