Re: [Rails] How to display the list of children as links under their respective parent

2011-04-07 Thread railer helper
Thanks for the suggestion manIt works exactly as i wanted.I din't know we can have a block inside another block!!! -- 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@googlegroups.

Re: [Rails] How to display the list of children as links under their respective parent

2011-04-07 Thread Michael Pavling
On 7 April 2011 19:37, railer helper wrote: >                          <% @categories.each do |cat| %> >                             <%=  link_to( cat.name, cat) %>                        <% cat.products.each do |product| %> >                         <%= link_to h(product.name),

[Rails] How to display the list of children as links under their respective parent

2011-04-07 Thread railer helper
Hey.Does nybody know how to display a list(array) as links Eg: I've a @products and @categories enumerable objects supplied to the view from a single CategoryController ... I want to show the products under their respective categories as links and get rid of the separate show page for displayin