1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #5470 from sandeepravi/warning_fixes

fixed - warning: instance variable @controller not initialized
This commit is contained in:
José Valim 2012-03-17 00:18:39 -07:00
commit cb0585eabe

View file

@ -54,6 +54,11 @@ module ActionController #:nodoc:
class Sweeper < ActiveRecord::Observer #:nodoc: class Sweeper < ActiveRecord::Observer #:nodoc:
attr_accessor :controller attr_accessor :controller
def initialize(*args)
super
@controller = nil
end
def before(controller) def before(controller)
self.controller = controller self.controller = controller
callback(:before) if controller.perform_caching callback(:before) if controller.perform_caching