From a111e1a271917c56306b7935677ae212027f7702 Mon Sep 17 00:00:00 2001 From: Scott Barron Date: Tue, 27 Sep 2005 11:02:11 +0000 Subject: Keep flash after component is rendered. Closes #2291. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/components.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index 7a6c6139d4..409998525d 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -43,7 +43,9 @@ module ActionController #:nodoc: private def component_response(options, reuse_response = true) - component_class(options).process(request_for_component(options), reuse_response ? @response : response_for_component) + c = component_class(options) + c.after_filter {|c| flash.keep } + c.process(request_for_component(options), reuse_response ? @response : response_for_component) end def component_class(options) -- cgit v1.2.3