Performing a redirect with AJAX
1 2 <% link_to_remote "Foo", 3 :url => { :action => "foo" }, 4 302 => "document.location = request.getResponseHeader('location')" %> 5
Or, an example from the Typo source:
1 2 <%= form_remote_tag :url => {:action => "comment", :id => @article}, 3 :update => {:success => 'commentList'}, 4 :loading => "loading()", 5 :complete => "complete(request)", 6 :failure => "failure(request)", 7 :html => {:id=>"commentform",:class=>"commentform"}, 8 302 => "document.location=request.getResponseHeader('location')"%>