Forum: Ruby on Rails Ajax inserting a collection of partials

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Pat M. (Guest)
on 2006-04-03 02:59
(Received via mailing list)
I saw that I can use page.insert_html to insert some HTML code into a
page.  Is it somehow possible to use a collection of partials?  Right
now I'm having to do

Post.find(:all, :order => 'created_at DESC').each do |post|
  page.insert_html :bottom, 'posts', :partial => 'post', :object => post

I'd really prefer to do
page.insert_html :bottom, 'posts', :partial => 'post', :collection =>
Post.find(:all, :order => 'created_at DESC')

This topic is locked and can not be replied to.