Permalink
Browse files

Fixed bug 6440 by checking that destroy exists on the session

  • Loading branch information...
1 parent 589ce09 commit 8ca8ac379d8a2d10f39fdef67db545732fe95309 @robdimarco robdimarco committed Mar 1, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_controller/request.rb
View
4 actionpack/lib/action_controller/request.rb
@@ -446,7 +446,9 @@ def session=(session) #:nodoc:
end
def reset_session
- session.destroy if session
+ # session may be a hash, if so, we do not want to call destroy
+ # fixes issue 6440
+ session.destroy if session and session.respond_to?(:destroy)
self.session = {}
end

0 comments on commit 8ca8ac3

Please sign in to comment.