Browse files

Merge pull request #5470 from sandeepravi/warning_fixes

fixed - warning: instance variable @controller not initialized
  • Loading branch information...
2 parents ab9f1b6 + 5ae53d5 commit cb0585eabe770ca92d72a935b06c8cb408b5d7a2 @josevalim josevalim committed Mar 17, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/lib/action_controller/caching/sweeping.rb
View
5 actionpack/lib/action_controller/caching/sweeping.rb
@@ -54,6 +54,11 @@ def cache_sweeper(*sweepers)
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

0 comments on commit cb0585e

Please sign in to comment.