From a9d686b2fbc1b6e158cd2a3ed5f0f3092611f6ce Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Mon, 21 Sep 2015 14:57:33 +0200 Subject: Link project repo size to files --- app/helpers/projects_helper.rb | 4 ++-- app/views/projects/show.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index a2b83c50c2e..7b4747ce3d7 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -156,8 +156,8 @@ module ProjectsHelper end end - def repository_size(project = nil) - "#{(project || @project).repository_size} MB" + def repository_size(project = @project) + "#{project.repository_size} MB" rescue # In order to prevent 500 error # when application cannot allocate memory diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index aa5914e3ed9..6a5fc689803 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -24,7 +24,7 @@ = pluralize(number_with_delimiter(@repository.tag_names.count), 'tag') %li - = link_to namespace_project_path(@project.namespace, @project) do + = link_to project_files_path(@project) do = repository_size - if !prefer_readme? && @repository.readme -- cgit v1.2.1