Created
February 7, 2018 03:32
-
-
Save fernandohenriques/d4411d9eef3b9775a15bec3d491f03fe to your computer and use it in GitHub Desktop.
Seconds to H:M
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ControllerHelper | |
def secondsToHM(s) | |
Time.at(s).utc.strftime("%H:%M") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= secondsToHM(seconds) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment