From e38f6fcb549c02044b3bc28aa95bb6ea46639148 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Thu, 20 Jul 2017 23:34:14 +0100 Subject: [PATCH] Use readme path to load readme on init --- app/helpers/tree_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 196b2a5119d..bc2b3c97fe7 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -13,7 +13,11 @@ module TreeHelper end def repo_url(project) - controller_name == 'projects' ? project_tree_url(project, project.default_branch) : request.original_url + if controller_name == 'projects' + readme_path(project) + else + request.original_url + end end # Return an image icon depending on the file type and mode