module ClipsHelper def seconds_to_time(seconds) if seconds >= 3600 then Time.at(seconds.round).utc.strftime("%H:%M:%S") #=> "01:00:00" else Time.at(seconds.round).utc.strftime("%M:%S") #=> "01:00:00" end end end