Permalink
Browse files

Fixed that the flash should be reset when reset_session is called (cl…

…oses #5584) [shugo@ruby-lang.org]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Jul 5, 2006
1 parent 760bcc6 commit 28ef328baa7bdc134667b7da3d5e8b0777a35cc0
Showing with 9 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +7 −1 actionpack/lib/action_controller/flash.rb
View
@@ -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]
@@ -30,6 +30,7 @@ def self.included(base)
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 @@ def process_cleanup_with_flash
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 @@ def keep_flash #:doc:
end
end
end
-end
+end

0 comments on commit 28ef328

Please sign in to comment.