I have one problem related to Ajax and render :partial. I develop a
small search application. When there are the results that match to the
user's search, it will render the partial views of the result search
to replace part of the document. However, when the result is not
matched, I want to display an alert box to the user back and keep the
previous result's search on the screen without erasing it. Is there a
way to cancel the render? Normally, after Ajax response, it will erase
the previous content. I want to know how to prevent this? Here is my
if @result.length > 0
render :partial => "result_list"
Any idea? Please, help.....