RJS replace_html for all divs with a class

Hi-

I want to do a bunch of html_replace 's for a class of divs, not one single div and I want to replace the content with a partial. I can round them up using page.select, but cannot find something that will easily let me do something like:

page.select(div.user).each do |d|   d.replace_html render partial => y partial end

Any ideas?

Thanks, Dino

Try:

page.select('div.user').each do |d|   page.replace_html d, :partial => 'y' end

-- Posted viahttp://www.ruby-forum.com/.

Thanks! It works.

Dino