dacbo
1
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
dacbo
2
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
dacbo
3
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.