Skip to content

Commit

Permalink
Merge pull request rails#6632 from route/one_line_code_for_logger
Browse files Browse the repository at this point in the history
One-liner code for logger in ActionView::Helpers::ControllerHelper
  • Loading branch information
josevalim committed Jun 5, 2012
2 parents 76830e1 + 425608e commit 272a7b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions actionpack/lib/action_view/helpers/controller_helper.rb
Expand Up @@ -18,11 +18,7 @@ def assign_controller(controller)
end

def logger
if controller.respond_to?(:logger)
controller.logger
else
nil
end
controller.logger if controller.respond_to?(:logger)
end
end
end
Expand Down

0 comments on commit 272a7b9

Please sign in to comment.