Forum: Ruby on Rails Ajax inserting a collection of partials

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2006-04-03 00: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
end

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

Pat
This topic is locked and can not be replied to.