Download link for binary

This commit is contained in:
Dmitriy Zaporozhets 2011-12-15 08:42:24 +02:00
parent 0712e78597
commit ed3f3a0d4d
4 changed files with 17 additions and 4 deletions

View file

@ -32,4 +32,13 @@ class TreeDecorator < ApplicationDecorator
def history_path
h.project_commits_path(project, :path => path, :ref => ref)
end
def mb_size
size = (tree.size / 1024)
if size < 1024
"#{size} KB"
else
"#{size/1024} MB"
end
end
end