aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorScott Barron <scott@elitists.net>2005-09-27 11:02:11 +0000
committerScott Barron <scott@elitists.net>2005-09-27 11:02:11 +0000
commita111e1a271917c56306b7935677ae212027f7702 (patch)
tree7ab97eddd3947c66e2aa5b555ae7d315f42e3078 /actionpack/lib/action_controller
parent72c3ffc7fb636859343b69fcf3c2bb418abe6883 (diff)
downloadrails-a111e1a271917c56306b7935677ae212027f7702.tar.gz
rails-a111e1a271917c56306b7935677ae212027f7702.tar.bz2
rails-a111e1a271917c56306b7935677ae212027f7702.zip
Keep flash after component is rendered. Closes #2291.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/components.rb4
1 files changed, 3 insertions, 1 deletions
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)