doesn't leave much for the controller ... just set category? On Wednesday, November 25, 2015 at 11:56:06 AM UTC-5, Colin Law wrote: > > On 25 November 2015 at 16:46, fugee ohu <fuge...@gmail.com <javascript:>> > wrote: > > I'm sorry, i meant to say in the side pane should be links to only the > > immediate children categories, not all descendants, just the next level > > So in the side pane > @category.children.each do |category| > category.name (or whatever) > end > > and if in the main pane you want the listings for all descendant children > @category.descendants.each do |category| > category.listings.each do |listing| > # show listing data > end > end > > Colin >
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a0f9a98b-28e2-4e7d-8f5e-2e4b5f863f8b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.