As far as I know, you cannot use the include: parameter as you describe.
What is the problem with getting all events? In any case, you will have to upload / join / query the event table. However, you need more memory if you trigger all events.
Of course, you could fulfill two queries: one for users with today events and one for those who donโt.
You can also go in the opposite direction:
Event.find(:all, :conditions => "...only today...", :include => :user)
That will give you all the events for today with the included users. You can use another query to get all users, not including events, and do everything else in memory.
averell
source share