Permalink
Browse files

Merge [6253] from trunk. References #6680.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 742bee4 commit 9679cb4d979240aacbc3bd8e22a17942627d3414 @jeremy jeremy committed Feb 27, 2007
View
2 actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* session_enabled? works with session :off. #6680 [Catfish]
+
* Performance: patch cgi/session to require digest/md5 once rather than per #create_new_id. [Stefan Kaes]
View
2 actionpack/lib/action_controller/base.rb
@@ -539,7 +539,7 @@ def controller_path
end
def session_enabled?
- request.session_options[:disabled] != false
+ request.session_options && request.session_options[:disabled] != false
end
protected
View
11 actionpack/test/controller/session_management_test.rb
@@ -142,4 +142,15 @@ def test_process_cleanup_with_session_management_support
get :tell
assert_equal "does not have cached associations", @response.body
end
+
+ def test_session_is_enabled
+ @controller = TestController.new
+ get :show
+ assert_nothing_raised do
+ assert_equal false, @controller.session_enabled?
+ end
+
+ get :tell
+ assert @controller.session_enabled?
+ end
end

0 comments on commit 9679cb4

Please sign in to comment.