aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-07 09:35:24 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-07 09:35:24 -0700
commita7c5d40d80179c19a249bed7a5f808dadf92b54c (patch)
tree96bf63a29e68898a0add3a93664c4fdd11801841 /actionpack
parent1e90229e044b82846078d370a9539bd2457793b9 (diff)
parent0e624ce9eb9056c8986621f3e6b7f5ca67b4cb12 (diff)
downloadrails-a7c5d40d80179c19a249bed7a5f808dadf92b54c.tar.gz
rails-a7c5d40d80179c19a249bed7a5f808dadf92b54c.tar.bz2
rails-a7c5d40d80179c19a249bed7a5f808dadf92b54c.zip
Merge branch 'master' of github.com:rails/rails
* 'master' of github.com:rails/rails: Cache flash now Revert "Use freeze instead of close!" Revert "Eagerly load Signed and Permanent cookies" cookies here Eagerly load Signed and Permanent cookies Use freeze instead of close!
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/flash.rb2
-rw-r--r--actionpack/test/dispatch/cookies_test.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb
index b5194c675c..027ff7f8ac 100644
--- a/actionpack/lib/action_dispatch/middleware/flash.rb
+++ b/actionpack/lib/action_dispatch/middleware/flash.rb
@@ -149,7 +149,7 @@ module ActionDispatch
#
# Entries set via <tt>now</tt> are accessed the same way as standard entries: <tt>flash['my-key']</tt>.
def now
- FlashNow.new(self)
+ @now ||= FlashNow.new(self)
end
# Keeps either the entire current flash or a specific flash entry available for the next action:
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index 1d06a755b8..ebc16694db 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -521,7 +521,7 @@ class CookiesIntegrationTest < ActionDispatch::IntegrationTest
end
end
- def test_setting_cookies_raises_after_stream_back_to_client_even_with_an_empty_flash
+ def test_setting_cookies_raises_after_stream_back_to_client_even_without_cookies
with_test_route_set do
get '/dont_set_cookies'
assert_raise(ActionDispatch::ClosedError) {
@@ -540,7 +540,7 @@ class CookiesIntegrationTest < ActionDispatch::IntegrationTest
end
end
- def test_setting_permanent_cookies_raises_after_stream_back_to_client_even_with_an_empty_flash
+ def test_setting_permanent_cookies_raises_after_stream_back_to_client_even_without_cookies
with_test_route_set do
get '/dont_set_cookies'
assert_raise(ActionDispatch::ClosedError) {
@@ -559,7 +559,7 @@ class CookiesIntegrationTest < ActionDispatch::IntegrationTest
end
end
- def test_setting_signed_cookies_raises_after_stream_back_to_client_even_with_an_empty_flash
+ def test_setting_signed_cookies_raises_after_stream_back_to_client_even_without_cookies
with_test_route_set do
get '/dont_set_cookies'
assert_raise(ActionDispatch::ClosedError) {