Hi, I''m having trouble getting the records I need from ActiveRecord. I have a category model which is using acts_as_tree. I have two levels of categories currently. So, I have something like this: Main Category 1 |- Sub Category 1 |- Sub Category 2 Main Category 2 |- Sub Category 1 |- Sub Category 2 Products belong to 1 or many of the sub categories. I''m trying to get 3 records from within either of the main categories. So, for example, I want 3 records from "Main Category 1". I also have many images associated with each product using attachment_fu. I''ve tried Category.find_by_name("Main Category 1").products.find(:all, :include => :images, :conditions => [''products.id IN (6,7,8)'']) But this doesn''t work because no products actually exist in that category, but they do in its sub categories. I know I can do a JOIN manually, but then I don''t get all the data back as the correct objects, just as extra attributes of the Product model. Any tips or pointers regarding how to do this would be appreciated. Thanks, Jordan -- Jordan Elver --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---