From 5ae53d5cde5a5e3041d72a671f7763f6951fab4c Mon Sep 17 00:00:00 2001 From: Sandeep Date: Fri, 16 Mar 2012 19:41:15 +0530 Subject: [PATCH] fixed - warning: instance variable @controller not initialized --- actionpack/lib/action_controller/caching/sweeping.rb | 5 +++++ 1 file changed, 5 insertions(+) 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