Hey,
is it possible to use replace_html together with a render :action?
This is my code: render :update do |page| page.replace_html 'contentBody', render(:action => 'new') end
and this is the confusing result in my contentBody: try { Element.update("contentBody", ""); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.update(\"contentBody\", \"\");' ); throw e }
Why doesn't it work? Is there any alternative? It's a bit tricky because: - I can't redirect_to because I need the content in 'contentBody' - I can't render :action cause it wouldn't know where to put the content (coming from a form_remote_tag) - I can't use partials cause I need to use normal views
Anyone any idea? Thanks in advance!