How to redirect out of a controller action from an ajax request

Viewed 23

Currently doing redirect_to and return still enters the .js.erb file, and therefore rendering some js. Is there a way to exit the request in the controller?

1 Answers

you can use below instead of redirect_to and return

redirect_to url :status => 301

I hope this will help you.

Related