Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

AV::logger returns AC::logger if it's defined, workaround meanwhile A…

…V doesn't have it's own logger

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 3ab296fd594d9d9e8b96d12f81ac3582dd81fd1f 1 parent 824da60
@spastorino spastorino authored josevalim committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/lib/action_view/log_subscriber.rb
View
5 actionpack/lib/action_view/log_subscriber.rb
@@ -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
+ActionView::LogSubscriber.attach_to :action_view
Please sign in to comment.
Something went wrong with that request. Please try again.