Hi,
I am using postgres sql.
I am writing following query to get the user friends.
The query is working fine.
“User.fnd (:all,:joins => “INNER JOIN friendship_requests fr on
(users.id = fr.friendship_target_id or users.id= fr.user_id)”,
:conditions => [’(fr.user_id = ? or fr.friendship_target_id= ?) and
users.id != ? AND fr.status = ?’, self.id,self.id, self.id,
‘accepted’])”
The query only returns me the user object, but I want the
friendship_requests object as well.
Can anyone tell how should I modify this query so that I will get the
both users as well as friendship_requests object.
Thanks,
Tushar