RE: RJS replace_html auto-closing tags

Maybe you can try:

html = ‘


@projects.each do |p|
html << ‘results’ << p.name << ‘

end
html << ‘searchresults’ << ‘

page.replace_html ‘results’, html

Something like that.

Chris

I think both options are pretty awkward.

Put the stuff in a partial and do a replace with :partial render option.

Ed Frederick – edwardfrederick.com

Oh, and use replace, not replace_html.

The first div wasn’t added for you, its just that it’s ‘still there’
because you’re just replacing the innards.