diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 268c563700c..6a2de0de77c 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -313,9 +313,11 @@ module ProjectsHelper end end - def detect_project_title(project) - current_ref = @ref || project.repository.root_ref + def current_ref + @ref || @repository.try(:root_ref) + end + def detect_project_title(project) name, url = if current_controller? 'wikis' ['Wiki', get_project_wiki_path(project)] |