aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-07-05 01:14:53 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-07-05 01:14:53 +0000
commit28ef328baa7bdc134667b7da3d5e8b0777a35cc0 (patch)
treec5c1bce00d982bd1a94b38a33d34ad24243ecc89 /actionpack
parent760bcc6ea93d235294cb741a2359365794365c34 (diff)
downloadrails-28ef328baa7bdc134667b7da3d5e8b0777a35cc0.tar.gz
rails-28ef328baa7bdc134667b7da3d5e8b0777a35cc0.tar.bz2
rails-28ef328baa7bdc134667b7da3d5e8b0777a35cc0.zip
Fixed that the flash should be reset when reset_session is called (closes #5584) [shugo@ruby-lang.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/flash.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 47616301a0..e00fc9e64a 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed that the flash should be reset when reset_session is called #5584 [shugo@ruby-lang.org]
+
* Added special case for "1 Byte" in NumberHelper#number_to_human_size #5593 [murpyh@rubychan.de]
* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH]
diff --git a/actionpack/lib/action_controller/flash.rb b/actionpack/lib/action_controller/flash.rb
index 61ac33f399..ea7a49ab77 100644
--- a/actionpack/lib/action_controller/flash.rb
+++ b/actionpack/lib/action_controller/flash.rb
@@ -30,6 +30,7 @@ module ActionController #:nodoc:
base.class_eval do
alias_method_chain :assign_shortcuts, :flash
alias_method_chain :process_cleanup, :flash
+ alias_method_chain :reset_session, :flash
end
end
@@ -143,6 +144,11 @@ module ActionController #:nodoc:
flash.sweep if @session
process_cleanup_without_flash
end
+
+ def reset_session_with_flash
+ reset_session_without_flash
+ @flash = nil
+ end
protected
# Access the contents of the flash. Use <tt>flash["notice"]</tt> to read a notice you put there or
@@ -172,4 +178,4 @@ module ActionController #:nodoc:
end
end
end
-end \ No newline at end of file
+end