diff options
author | José Valim <jose.valim@gmail.com> | 2012-06-05 04:08:30 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-06-05 04:08:30 -0700 |
commit | 272a7b902e8eb3528df4a78f94237fac340735c0 (patch) | |
tree | ce4e9574e65ebecfdf0d41a8f3248aafcb0f4597 /actionpack/lib/action_view/helpers/controller_helper.rb | |
parent | 76830e110a73d6db0dafd42fc960686637cbfc7b (diff) | |
parent | 425608e761ff1b89490397982407b3cb44cd1d7e (diff) | |
download | rails-272a7b902e8eb3528df4a78f94237fac340735c0.tar.gz rails-272a7b902e8eb3528df4a78f94237fac340735c0.tar.bz2 rails-272a7b902e8eb3528df4a78f94237fac340735c0.zip |
Merge pull request #6632 from route/one_line_code_for_logger
One-liner code for logger in ActionView::Helpers::ControllerHelper
Diffstat (limited to 'actionpack/lib/action_view/helpers/controller_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/controller_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/controller_helper.rb b/actionpack/lib/action_view/helpers/controller_helper.rb index 0c3806a78c..74ef25f7c1 100644 --- a/actionpack/lib/action_view/helpers/controller_helper.rb +++ b/actionpack/lib/action_view/helpers/controller_helper.rb @@ -18,11 +18,7 @@ module ActionView end def logger - if controller.respond_to?(:logger) - controller.logger - else - nil - end + controller.logger if controller.respond_to?(:logger) end end end |