diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/wittle/puzzles_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/wittle/puzzles_helper.rb b/app/helpers/wittle/puzzles_helper.rb index 6230940..64364c6 100644 --- a/app/helpers/wittle/puzzles_helper.rb +++ b/app/helpers/wittle/puzzles_helper.rb | |||
@@ -1,4 +1,9 @@ | |||
1 | module Wittle | 1 | module Wittle |
2 | module PuzzlesHelper | 2 | module PuzzlesHelper |
3 | |||
4 | def humanize_interval(seconds) | ||
5 | "#{(seconds / 60).to_s.rjust(2, '0')}:#{(seconds % 60).to_s.rjust(2, '0')}" | ||
6 | end | ||
7 | |||
3 | end | 8 | end |
4 | end | 9 | end |