"Wolas!" wrote:
> Message.all(:conditions => {:user_id => current_user.friends})
>
> assuming the table messages has a column user_id.
>
>
> On Mar 15, 10:27�pm, comopasta Gr <[email protected]>
Thanks Wolas, actually that worked fine :-)
I'm a bit worried about the performance side of that request since there
can be a huge number of messages and users. Of course user_id should be
indexed in that table but I'm still worried.
Any comments on the performance from anyone?
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
-~----------~----~----~----~------~----~------~--~---