RJS replace_html auto-closing tags

I’m using the following RJS template to spit out a div containing a
list of projects:

page.replace_html ‘results’, ‘


@projects.each do |p|
page.insert_html :bottom, ‘results’, p.name + “

end
page.insert_html :bottom, ‘searchresults’, ‘

page.show ‘results’

However, it seems that my first like to insert the

tag
automatically sticks a
closing tag in as well. Is there any
way to avoid this, as I’d like the content from the loop to be
inserted into this div.

However, it seems that my first like to insert the

tag
automatically sticks a
closing tag in as well. Is there any
way to avoid this, as I’d like the content from the loop to be
inserted into this div.

How about:

page.replace_html ‘results’, ‘


@projects.each do |p|
page.insert_html :bottom, ‘projectsresults’, p.name + “

end
page.show ‘results’