I have an array full of events with a date field. I wanted to sort the array by the date field, but then after this is sorted, shuffle the events within each day (but still maintaining the date order).
@events = Event.order('date desc').shuffle....?
@events = Event.group("events.id").order("date, random()")
This will provide random ordering of the events for the same date.