diff options
author | José Valim <jose.valim@gmail.com> | 2012-03-17 00:18:39 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-03-17 00:18:39 -0700 |
commit | cb0585eabe770ca92d72a935b06c8cb408b5d7a2 (patch) | |
tree | 821e4477ebb7991ab48e1d0bd62949d6a0340c24 /actionpack/lib | |
parent | ab9f1b6f23324460729cb4f72ba58f0611fe558c (diff) | |
parent | 5ae53d5cde5a5e3041d72a671f7763f6951fab4c (diff) | |
download | rails-cb0585eabe770ca92d72a935b06c8cb408b5d7a2.tar.gz rails-cb0585eabe770ca92d72a935b06c8cb408b5d7a2.tar.bz2 rails-cb0585eabe770ca92d72a935b06c8cb408b5d7a2.zip |
Merge pull request #5470 from sandeepravi/warning_fixes
fixed - warning: instance variable @controller not initialized
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/caching/sweeping.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb index 808a6fe5f3..bb176ca3f9 100644 --- a/actionpack/lib/action_controller/caching/sweeping.rb +++ b/actionpack/lib/action_controller/caching/sweeping.rb @@ -54,6 +54,11 @@ module ActionController #:nodoc: class Sweeper < ActiveRecord::Observer #:nodoc: attr_accessor :controller + def initialize(*args) + super + @controller = nil + end + def before(controller) self.controller = controller callback(:before) if controller.perform_caching |