Skip to content
This repository
Browse code

Merge pull request #5470 from sandeepravi/warning_fixes

fixed - warning: instance variable @controller not initialized
  • Loading branch information...
commit cb0585eabe770ca92d72a935b06c8cb408b5d7a2 2 parents ab9f1b6 + 5ae53d5
José Valim authored March 17, 2012
5  actionpack/lib/action_controller/caching/sweeping.rb
@@ -54,6 +54,11 @@ def cache_sweeper(*sweepers)
54 54
       class Sweeper < ActiveRecord::Observer #:nodoc:
55 55
         attr_accessor :controller
56 56
 
  57
+        def initialize(*args)
  58
+          super
  59
+          @controller = nil
  60
+        end
  61
+
57 62
         def before(controller)
58 63
           self.controller = controller
59 64
           callback(:before) if controller.perform_caching

0 notes on commit cb0585e

Please sign in to comment.
Something went wrong with that request. Please try again.