提交 df7ca38d 编写于 作者: J Jeremy Kemper

session_enabled? works with session :off. Closes #6680.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 88876163
*SVN*
* session_enabled? works with session :off. #6680 [Catfish]
* Added :port and :host handling to UrlRewriter (which unified url_for usage, regardless of whether it's called in view or controller) #7616 [alancfrancis]
* Allow send_file/send_data to use a registered mime type as the :type parameter #7620 [jonathan]
......
......@@ -585,7 +585,7 @@ def controller_path
end
def session_enabled?
request.session_options[:disabled] != false
request.session_options && request.session_options[:disabled] != false
end
# View load paths for controller.
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册