Hi all,

This question might be a long shot, but I'm going to ask it anyway. In
my application, I've created a before_filter that does some magic. It
looks like this:

if request.xhr? then
  render :update do |page|
    page.redirect_to url_for_thingy
  end
else
  redirect_to redirect_to url_for_thingy
end

This works perfectly, however, I have one annoyance. On the server side,
I don't know if the xhr request coming in is from an AjaxUpdater or
AjaxRequest (using prototype here). It's possible that the browser will
update a DOM element or that it just expects some javascript code. When
an AjaxUpdater is used, the element is updated and the javascript is
executed (so the redirect is done), but it just doesn't look so nice.

Anyone got a solution?

Greetings,

Wouter
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to