Ruby has a sort_by method on Enumerables. Fantastic! So you can do something like
entries.sort_by { |l| l.project.name }
That would sort
You can use the regular sort method to do it.
entries.sort do |a, b| comp = a.project.name <=> b.project.name comp.zero? ? (a.project.time <=> b.project.time) : comp end