Forum: Ruby on Rails login redirect on ajax call?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mark (Guest)
on 2007-06-07 01:17

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?

Jason R. (Guest)
on 2007-06-07 01:23
(Received via mailing list)
If you're doing RJS, do a page.redirect_to(url).

This topic is locked and can not be replied to.