Render partial in Ruby on rails a collection is multiplying items
I want to display a list of items in a page in Ruby-on-Rails. I use partials in my index.html.erb file I have: <%= @lista = News.find(:all, :order => Document::COL_DATE + ' DESC, id DESC') render :partial => "newsitem", :layout => "list_news", :spacer_template => "spacer", :collection => @lista %> in _list_news.html.erb I have: <div class="news"> <%= yield %> </div> in _spacer.html.erb I have <hr/> in _newsitem.html.erb I have <%= newsitem_counter + 1 %> <!-- Code to print details for one item --> The problem is that it prints the list multiple times: If the list has 3 items, it shows them 3