From 862cb4e3f9b9864bc1b5a20cd7ebd7c4d6cccb77 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 29 Oct 2023 14:46:27 -0400 Subject: added timer --- app/helpers/wittle/puzzles_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/helpers') 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 @@ module Wittle module PuzzlesHelper + + def humanize_interval(seconds) + "#{(seconds / 60).to_s.rjust(2, '0')}:#{(seconds % 60).to_s.rjust(2, '0')}" + end + end end -- cgit 1.4.1