diff options
Diffstat (limited to 'app/helpers/puzzles_helper.rb')
-rw-r--r-- | app/helpers/puzzles_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/puzzles_helper.rb b/app/helpers/puzzles_helper.rb new file mode 100644 index 0000000..ded1e8d --- /dev/null +++ b/app/helpers/puzzles_helper.rb | |||
@@ -0,0 +1,7 @@ | |||
1 | module PuzzlesHelper | ||
2 | |||
3 | def humanize_interval(seconds) | ||
4 | "#{(seconds / 60).to_s.rjust(2, '0')}:#{(seconds % 60).to_s.rjust(2, '0')}" | ||
5 | end | ||
6 | |||
7 | end | ||