From 3ab296fd594d9d9e8b96d12f81ac3582dd81fd1f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sun, 27 Jun 2010 19:46:57 -0300 Subject: AV::logger returns AC::logger if it's defined, workaround meanwhile AV doesn't have it's own logger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_view/log_subscriber.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/log_subscriber.rb') 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 -- cgit v1.2.3