session_enabled? works with session :off. Closes #6680.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
88876163f9
commit
df7ca38d7d
@ -1,5 +1,7 @@
|
||||
*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
|
||||
|
Loading…
Reference in New Issue
Block a user