Displaying 1 result from an estimated 1 matches for "time_sheet_entri".
Did you mean:
time_sheet_entries
2006 Jul 25
4
Sorting by two fields
I have a list of TimeSheet objects from an ealier AR query, which I
can sort by the full name of the user like so:
@time_sheet_entries.sort! { |a,b| a.user.full_name <=> b.user.full_name }
I can sort by the started time like so:
@time_sheet_entries.sort! { |a,b| a.start_time <=> b.start_time }
My question is how do I do a sort so that the list is sorted primarily
by user.full_name but also by start_time? So that a...