diff options
Diffstat (limited to 'actionpack/lib/action_controller/components.rb')
-rw-r--r-- | actionpack/lib/action_controller/components.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index 7f7cb361f8..4d5dc20ab1 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -111,9 +111,9 @@ module ActionController #:nodoc: end def flash_with_components(refresh = false) #:nodoc: - if @flash.nil? || refresh - @flash = - if @parent_controller + if !defined?(@flash) || refresh + @flash = + if defined?(@parent_controller) @parent_controller.flash else flash_without_components |