提交 3ab296fd 编写于 作者: S Santiago Pastorino 提交者: José Valim

AV::logger returns AC::logger if it's defined, workaround meanwhile AV doesn't have it's own logger

Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 824da60a
......@@ -12,8 +12,9 @@ def render_template(event)
alias :render_partial :render_template
alias :render_collection :render_template
# TODO: Ideally, ActionView should have its own logger so it does not depend on AC.logger
def logger
ActionController::Base.logger
ActionController::Base.logger if defined?(ActionController::Base)
end
protected
......@@ -24,4 +25,4 @@ def from_rails_root(string)
end
end
ActionView::LogSubscriber.attach_to :action_view
\ No newline at end of file
ActionView::LogSubscriber.attach_to :action_view
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册