Hi everyone,
I have a model like the following User.id
Friends invited (fk to user) inviter (fk to user)
Now, what I would like to do is given a uid, retrieve all the users related to the inviter. So a retarded way of oding hti sis..
friendRequests = Friend.find(:all, :conditions => {:invited_id => uid})
Then iterate through the friend requests, grabbing each user object..
I know there is a better way of doing this in one query.. can I have some direction on doing this?
thanks! -dan