mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixed - warning: instance variable @controller not initialized
This commit is contained in:
parent
5245eb30b1
commit
5ae53d5cde
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue