diff options
author | Matthew Draper <matthew@trebex.net> | 2016-02-26 04:43:52 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-02-26 04:47:30 +1030 |
commit | ee5b621e2f8fde380ea4bc75b0b9d6f98499f511 (patch) | |
tree | d4e9e9d57403a5fc982ae539397bad43b44013e0 | |
parent | 6216a092ccfe6422f113db906a52fe8ffdafdbe6 (diff) | |
download | rails-ee5b621e2f8fde380ea4bc75b0b9d6f98499f511.tar.gz rails-ee5b621e2f8fde380ea4bc75b0b9d6f98499f511.tar.bz2 rails-ee5b621e2f8fde380ea4bc75b0b9d6f98499f511.zip |
Revert "Merge pull request #20851 from tomprats/indifferent-sessions"
This reverts commit 22db455dbe9c26fe6d723cac0758705d9943ea4b, reversing
changes made to 40be61dfda1e04c3f306022a40370862e3a2ce39.
This finishes off what I meant to do in 6216a092ccfe6422f113db906a52fe8ffdafdbe6.
-rw-r--r-- | actionpack/CHANGELOG.md | 9 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/request/session.rb | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/request/session_test.rb | 10 |
3 files changed, 2 insertions, 21 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 5b762a8f17..6b73b29ace 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -29,15 +29,6 @@ ## Rails 5.0.0.beta3 (February 24, 2016) ## -* Update session to have indifferent access across multiple requests. - - session[:deep][:hash] = "Magic" - - session[:deep][:hash] == "Magic" - session[:deep]["hash"] == "Magic" - - *Tom Prats* - * Add application/gzip as a default mime type. *Mehmet Emin İNAÇ* diff --git a/actionpack/lib/action_dispatch/request/session.rb b/actionpack/lib/action_dispatch/request/session.rb index f6428af636..42890225fa 100644 --- a/actionpack/lib/action_dispatch/request/session.rb +++ b/actionpack/lib/action_dispatch/request/session.rb @@ -9,7 +9,7 @@ module ActionDispatch # Singleton object used to determine if an optional param wasn't specified Unspecified = Object.new - + # Creates a session hash, merging the properties of the previous session if any def self.create(store, req, default_options) session_was = find req @@ -61,7 +61,7 @@ module ActionDispatch def initialize(by, req) @by = by @req = req - @delegate = {}.with_indifferent_access + @delegate = {} @loaded = false @exists = nil # we haven't checked yet end diff --git a/actionpack/test/dispatch/request/session_test.rb b/actionpack/test/dispatch/request/session_test.rb index 3fc4ffd71c..7dcbcc5c21 100644 --- a/actionpack/test/dispatch/request/session_test.rb +++ b/actionpack/test/dispatch/request/session_test.rb @@ -105,16 +105,6 @@ module ActionDispatch end end - def test_with_indifferent_access - s = Session.create(store, req, {}) - - s[:one] = { test: "deep" } - s[:two] = { "test" => "deep" } - - assert_equal 'deep', s[:one]["test"] - assert_equal 'deep', s[:two][:test] - end - private def store Class.new { |