I have a model called Event that has many EventRegistrations, which belongs to a person.
Also the EventRegistration has many EventAtendees, which belongs to a person too.
I want to order in Rails all the people related to a event, which means:
– Person associated to an event registration
– Person associated to an event atendee which is associated to a registration..
Any help?
Here is how you would order by the person’s last name, assuming you have all your ActiveRecord associations set up correctly.