I’m running into a problem where Firefox is returning this error page
“The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to
accept cookies.”
Cookies though are enabled so that is not the problem. Now I’m using
restful_authentication plugin. I have set this in my application.rb
controller file -
include AuthenticatedSystem
before_filter :login_required
The login_required method looks like it should redirect to my login
page:
and here is access_denied
def access_denied
respond_to do |accepts|
accepts.html do
store_location
redirect_to :controller => ‘sessions’, :action => ‘new’
end
So as the code above reflects the redirect is attempting to go to
sessions/new and it does reflect that in the browser url , however
instead of displaying the login page I get the above error. Any ideas
?
I’m running into a problem where Firefox is returning this error page
“The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to
accept cookies.”
Are you skipping the before_filter in :controller => ‘sessions’ ?
If not you’ll get an infinite redirection loop (since loading
sessions/new will also result in access denied being called).
Thank you Frederick, I put the skip skip_before_filter in the sessions
controller and it’s redirecting correctly. Just seemed that the
access_denied method was set up for that specific reason. I gather
it’s because logged_required is in the application controller.