Hi Michael,

On Thu, Dec 22, 2011 at 6:33 PM, Michael Mahemoff <[email protected]> wrote:
> A lot of calls in Rails end in a redirect_to, and this is really an
> unnecessary round trip in the case of XHR calls. This might sound
> crazy, but why not just handle the redirect on the server? I realize
> in some cases a redirect will probably be better if the redirected
> resource is cached, but that's not always the case.
>
> Is there any advice/prior art on doing such a thing, and is it
> sensible to do it? I'm thinking the best way is to monkey-patch the
> default redirect_to method.

The RJS library provides a server-side redirect_to for use with
prototype.js.  You might want to start there.

HTH,
Bill

-- 
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