Mark Moore
2011-Mar-23 18:42 UTC
how to select all categories select name only , subcategories select name only, limit X items
I have 3 models where ''Categories'' have many ''Sub-Categories'' and many ''Items'' through ''Sub Categories''. What is a standard Rails 3 way of showing latest few ''items'' from each ''sub-categories'' that belongs to ''categories''. So in my view I''d have something like: category: Music sub-category: Classical items: mozart, bach (sorted by created_at) sub-category:Rock ...... Category: Film.... So I would want: all categories select name only , subcategories select name only, limit X items Thanks, Mark -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.