diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-29 14:46:27 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-29 14:46:27 -0400 |
| commit | 862cb4e3f9b9864bc1b5a20cd7ebd7c4d6cccb77 (patch) | |
| tree | b3e80c19d9c5725178279c69cb1ee660901f9a66 /app/helpers | |
| parent | d672465c2be3dc54463a92a3f1c4aa23447bc5c8 (diff) | |
| download | wittle-862cb4e3f9b9864bc1b5a20cd7ebd7c4d6cccb77.tar.gz wittle-862cb4e3f9b9864bc1b5a20cd7ebd7c4d6cccb77.tar.bz2 wittle-862cb4e3f9b9864bc1b5a20cd7ebd7c4d6cccb77.zip | |
added timer
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 |
