aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/flash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/flash.rb')
-rw-r--r--actionpack/lib/action_controller/flash.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/flash.rb b/actionpack/lib/action_controller/flash.rb
index 674f73f1a4..df2863e0b6 100644
--- a/actionpack/lib/action_controller/flash.rb
+++ b/actionpack/lib/action_controller/flash.rb
@@ -43,6 +43,9 @@ module ActionController #:nodoc:
end
class FlashHash < Hash
+ @@avoid_sweep = false
+ cattr_accessor :avoid_sweep
+
def initialize #:nodoc:
super
@used = {}
@@ -99,6 +102,7 @@ module ActionController #:nodoc:
#
# This method is called automatically by filters, so you generally don't need to care about it.
def sweep #:nodoc:
+ return if @@avoid_sweep
keys.each do |k|
unless @used[k]
use(k)