From 2399a223c35622178ea58db6629cfd26f2230d60 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 7 Aug 2006 06:11:56 +0000 Subject: Deprecation! @session and @flash will be removed after 1.2. Use the session and flash methods instead. You'll get printed warnings during tests and logged warnings in dev mode when you access either instance variable directly. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4699 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/components.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/components.rb') diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index 4d5dc20ab1..c05b1eb068 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -111,16 +111,15 @@ module ActionController #:nodoc: end def flash_with_components(refresh = false) #:nodoc: - if !defined?(@flash) || refresh - @flash = + if !defined?(@_flash) || refresh + @_flash = if defined?(@parent_controller) @parent_controller.flash else flash_without_components end end - - @flash + @_flash end private -- cgit v1.2.3