Closed millisami closed 12 years ago
I had the same problem on Rails 2.3.9
Below is a snippet from the source of lib/casclient/frameworks/rails/filter.rb
As you can see, the reset_session is already called in this method.
In your case, you're calling it twice, once in your logout method and once in the logout method of CASClient. Thereby, the second call tries to destroy an empty Hash object, resulting in a NoMethodError.
The fix is to simply comment out the reset_session in your own method.
def logout(controller, service = nil)
referer = service || controller.request.referer
st = controller.session[:cas_last_valid_ticket]
delete_service_session_lookup(st) if st
controller.send(:reset_session)
controller.send(:redirect_to, client.logout_url(referer))
end
This was all fine till Rails3.0.0.4.beta Today I upgraded the rails to rc and now its blowing up while logging out.
sessions_controller.rb