提交 cb0585ea 编写于 作者: J José Valim

Merge pull request #5470 from sandeepravi/warning_fixes

fixed - warning: instance variable @controller not initialized
......@@ -54,6 +54,11 @@ def cache_sweeper(*sweepers)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册