Method: ApplicationHelper#seconds_sentence
- Defined in:
- app/helpers/application_helper.rb
#seconds_sentence(time) ⇒ Object
14 15 16 17 18 19 |
# File 'app/helpers/application_helper.rb', line 14 def seconds_sentence(time) return "Running now..." if time < 0 return "Less than a second" if time == 0 return "1 second" if time == 1 "#{time} seconds" end |