Changeset 2722
- Timestamp:
- 10/25/05 00:38:51 (3 years ago)
- Files:
-
- trunk/actionpack/lib/action_controller/components.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/flash.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/components.rb
r2604 r2722 51 51 private 52 52 def component_response(options, reuse_response = true) 53 c = component_class(options) 54 c.after_filter {|c| flash.keep } 55 c.process(request_for_component(options), reuse_response ? @response : response_for_component) 53 begin 54 ActionController::Flash::FlashHash.avoid_sweep = true 55 Thread.current[:p] = component_class(options).process(request_for_component(options), reuse_response ? @response : response_for_component) 56 ensure 57 ActionController::Flash::FlashHash.avoid_sweep = false 58 end 59 Thread.current[:p] 56 60 end 57 61 trunk/actionpack/lib/action_controller/flash.rb
r2649 r2722 44 44 45 45 class FlashHash < Hash 46 @@avoid_sweep = false 47 cattr_accessor :avoid_sweep 48 46 49 def initialize #:nodoc: 47 50 super … … 100 103 # This method is called automatically by filters, so you generally don't need to care about it. 101 104 def sweep #:nodoc: 105 return if @@avoid_sweep 102 106 keys.each do |k| 103 107 unless @used[k]