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:
commit
cb0585eabe
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue