Please quote when replying. Fernando Leandro wrote in post #971088: > I think the problem is that you`re trying to call a tasks method from an > Array Class, you should do that for a Tab class, so try this, i didn`t > tested but i think it can help: > > User.find(particular_user_id).tabs.collect {|c| c.tasks}.flatten
However, this is a very poor solution. It performs many unnecessary DB queries, and I would never recommend its use. Using :through takes advantage of DB joins, which is the proper way. > > Good luck, > > Fernando Santos > > > 2010/12/28 Marnen Laibow-Koser <li...@ruby-forum.com> Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Sent from my iPhone -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.