提交 ab5070ed 编写于 作者: M monmon

Check if the logger exists before trying to use it

上级 ba03e6ad
......@@ -174,7 +174,7 @@ def scope(name, body, &block)
protected
def valid_scope_name?(name)
if respond_to?(name, true)
if respond_to?(name, true) && logger
logger.warn "Creating scope :#{name}. " \
"Overwriting existing method #{self.name}.#{name}."
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册