aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDmitry Vorotilin <d.vorotilin@gmail.com>2012-06-05 11:03:00 +0400
committerDmitry Vorotilin <d.vorotilin@gmail.com>2012-06-16 00:55:46 +0400
commit3b1ea3d896a6a1ebefdf3fcd461396ddbf8df230 (patch)
tree922275a59dd52bf8041535b0d0f33683de98f3ee /actionpack
parenta8e22aeadcf53a30893fbfbf6d446d504bd87b67 (diff)
downloadrails-3b1ea3d896a6a1ebefdf3fcd461396ddbf8df230.tar.gz
rails-3b1ea3d896a6a1ebefdf3fcd461396ddbf8df230.tar.bz2
rails-3b1ea3d896a6a1ebefdf3fcd461396ddbf8df230.zip
ActionController::Metal doesn't have logger method, check it and then delegate
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/controller_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/controller_helper.rb b/actionpack/lib/action_view/helpers/controller_helper.rb
index 1a583e62ae..74ef25f7c1 100644
--- a/actionpack/lib/action_view/helpers/controller_helper.rb
+++ b/actionpack/lib/action_view/helpers/controller_helper.rb
@@ -10,14 +10,16 @@ module ActionView
delegate :request_forgery_protection_token, :params, :session, :cookies, :response, :headers,
:flash, :action_name, :controller_name, :controller_path, :to => :controller
- delegate :logger, :to => :controller, :allow_nil => true
-
def assign_controller(controller)
if @_controller = controller
@_request = controller.request if controller.respond_to?(:request)
@_config = controller.config.inheritable_copy if controller.respond_to?(:config)
end
end
+
+ def logger
+ controller.logger if controller.respond_to?(:logger)
+ end
end
end
end