I use before_filter :login_required
on a controller, and everything behaves as it should - a user who isn't logged in is bumped to sessions/new. But given that I'm doing this on the root url, I'd like to avoid having an actual redirect (to not show /sessions/new) in the user's browser bar. How would I tweak?
views:
31answers:
1
+1
A:
Find where your login_required method is defined, and change the redirect_to location in there to be redirect_to root_path
.
If you are using restful_authentication, I believe the login_required method is defined in /lib/authenticated_system.rb
erik
2009-07-23 21:33:58