Ruby on Rails
Wednesday, November 25, 2015
nice, thanks colin
On Wednesday, November 25, 2015 at 11:56:06 AM UTC-5, Colin Law wrote:
-- 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> 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+unsubscribe@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/06191bf3-244d-40df-86f1-e1380259e667%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment