SELECT profiles.*, friendships.updated_at AS friendship_updated_at, friendships.profile_id, friendships.friend_id, friendships.accepted AS friendship_accepted, friendships.rejected AS friendship_rejected FROM `profiles` INNER JOIN `friendships` ON `profiles`.id = `friendships`.profile_id WHERE (((`friendships`.profile_id = 1) OR (`friendships`.friend_id = 1)) AND ((`friendships`.`accepted` = 0))) ORDER BY friendships.updated_at LIMIT 0, 10
more or less, this is the query. How do I make it a has many with belongs_to? I really dont know how to do it.. :s im working on it for 3-4 days... and still no answer. I dont use to ask for help in forums, but now... i really need some help here. Thanks! ;) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

