Hi!
I want to render 2 different actions - in different controller - when
the user clicks on a button.
I solved this with JS calls (Ajax.Updater) within the view,
but wanted to take the app logic out of the view and into the
controller.
So I created a new controller action, calling the 2 updates from there
like this:
render :update do |page|
page.replace_html ‘Browser’, :partial => ‘browser’
page.replace_html ‘DetailView’, :url => {:controller => ‘place’,
:action => ‘edit’, :id => @selection}
end
Unfortunately, the update of the DetailView does nothing.
The generated JS (for DetailView only) looks like this:
try {
Element.update(“DetailView”, null);
} catch (e) { alert(‘RJS error:\n\n’ + e.toString());
alert(‘Element.update(“DetailView”, null);’); throw e }
So nothing gets rendered.
What can I do?
Thanks!
Chris