projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
abandon "bold megabytes" feature
[arvados.git]
/
app
/
helpers
/
application_helper.rb
1
module ApplicationHelper
2
def current_user
3
controller.current_user
4
end
5
def human_readable_bytes_html(n)
6
return h(n) unless n.is_a? Fixnum
7
raw = n.to_s
8
cooked = ''
9
while raw.length > 3
10
cooked = ',' + raw[-3..-1] + cooked
11
raw = raw[0..-4]
12
end
13
cooked = raw + cooked
14
end
15
end