Rails 3: How to “redirect_to” in Ajax call?

Finally, I just replaced

redirect_to(:controller => 'jobs', :action => 'index')

with this:

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

and it works fine!

Leave a Comment