I’ve got the following problem with firefox:
When I click the back button after logging out, I can see all the
pages of the browser history where I was logged in. These pages are
not reloaded, so I assume the before_filter is not called. How do
other pages like groups.google.com avoid the browser history being
displayed again?
before_filter for all methods that require the user to be logged
in:
def user_test_logged
@user = User.find_by_id(session[:user_id])
if @user.nil?
redirect_to(:controller => “login” , :action => “login” ) and
return false
end
end
def login
reset_session
if request.post?
user = User.authenticate(params[:name], params[:password])
if user
session[:user_id] = user.id
redirect_to :action => ‘index’ and return false
end
end
render :layout => false
end
def logout
redirect_to :action => ‘login’
end
thanks
Luma