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
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.