Login redirect on ajax call?


#1

Hi,

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?

Cheers


#2

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

Jason