1 2 3 4 5 6 7
module PuzzlesHelper def humanize_interval(seconds) "#{(seconds / 60).to_s.rjust(2, '0')}:#{(seconds % 60).to_s.rjust(2, '0')}" end end