Browse Source

fix display of hours

main
Christoph Marzell 3 weeks ago
parent
commit
1ac03a58c6
  1. 10
      app/helpers/time_entries_helper.rb

10
app/helpers/time_entries_helper.rb

@ -0,0 +1,10 @@
module TimeEntriesHelper
def formatted_duration(entry)
hours = entry.hours.to_i
minutes = entry.minutes.to_i
return nil if hours == 0 && minutes == 0
format("%d:%02d", hours, minutes)
end
end
Loading…
Cancel
Save