We use this, on a page with display preferences. When a preference change is going to change most of the page, it's just easier to redisplay the whole thing. Note that page.redirect_to(:back) doesn't work.
render :update { |page| page.redirect_to(request.env["HTTP_REFERER"]) } Regards, Lori On Sun, Mar 30, 2008 at 9:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi all, > > In my application, I want seamless degradability so I use request.xhr? > to check whether a request is an ajax call. However here and there, I > need to use redirect_to - in this case the request is not xhr anymore, > and the check doesn't work as expected. Is there a way to make xhr- > like redirect (which allow to get to another controller+action)? > > Thanks, > - Chuong > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---