aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-06-27 19:46:57 -0300
committerJosé Valim <jose.valim@gmail.com>2010-06-28 01:26:17 +0200
commit3ab296fd594d9d9e8b96d12f81ac3582dd81fd1f (patch)
tree3a337dfc43ee32edf51d97f084c8c4727f16123b /actionpack
parent824da60ae86ac26b5cbc7d6354d233205d2addc6 (diff)
downloadrails-3ab296fd594d9d9e8b96d12f81ac3582dd81fd1f.tar.gz
rails-3ab296fd594d9d9e8b96d12f81ac3582dd81fd1f.tar.bz2
rails-3ab296fd594d9d9e8b96d12f81ac3582dd81fd1f.zip
AV::logger returns AC::logger if it's defined, workaround meanwhile AV doesn't have it's own logger
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/log_subscriber.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/log_subscriber.rb b/actionpack/lib/action_view/log_subscriber.rb
index 4a52937c58..443a0eafd1 100644
--- a/actionpack/lib/action_view/log_subscriber.rb
+++ b/actionpack/lib/action_view/log_subscriber.rb
@@ -12,8 +12,9 @@ module ActionView
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 @@ module ActionView
end
end
-ActionView::LogSubscriber.attach_to :action_view \ No newline at end of file
+ActionView::LogSubscriber.attach_to :action_view