I have a User
model and an Event
model. User has_many events
. What I want to be able to do is find the User that has the most events
created in the last 24 hours.
Ideally, the output format would have be an array of hashes [{User => [Event, Event, ...]}]
, which would be sorted by User's with the highest events.count
Thanks