My model stores pieces of data, and I have a method defined in the
model that aggregates those pieces into a more useful form. I’m trying
to figure out how to sort with the aggregate …
Currently I have Person has_many involvements, Person has_many events
:through=>:involvements, and it’s Events that has the aggregate method,
a ‘date’ field. When I’m holding a Person object, I can step through
person.involvements and look at the Event from there :-
for i in person.involvements
i.event.date
end
But I’d like to do that step through ordered by date Please help me
see what I’ve missed so far …
(The Involvements table is present because many People might be
Involved in an Event, in different roles – I’m storing the role in the
Involvement table at the moment. Perhaps I’ve made my life difficult?)
-jim