Login redirect on ajax call?


I have a link that uses the link_to_remote helper, however the method it
calls requires the user to log in.

before_filter :login_required

How can I get the method to re-direct the user if they are not logged in
when the Ajax call is made?


If you’re doing RJS, do a page.redirect_to(url).


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs