Rails 3: redirect_to with :remote => true

Don't know if this is answering this specific question, but some might find the following helpful:

module AjaxHelper
  def ajax_redirect_to(redirect_uri)
    { js: "window.location.replace('#{redirect_uri}');" }
  end
end

class SomeController < ApplicationController
  include AjaxHelper

  def some_action
    respond_to do |format|
      format.js { render ajax_redirect_to(some_path) }
    end
  end
end

I'm pretty sure you can specify the format in the redirect_to like this

redirect_to current_user, format: 'js'


I am pretty sure this code will work.

render :js => "window.location = '/jobs/index'

You can use this code in action /controller_name/action name/