Skip to content
Browse files

Merge pull request #2237 from jackdempsey/log_redirect_to

log at debug level what line caused the redirect_to
  • Loading branch information...
2 parents 835df6f + 3fa0007 commit 7aa96a130b3050d3c1f0277f333a75a474df93b0 @tenderlove tenderlove committed May 16, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/metal/redirecting.rb
View
1 actionpack/lib/action_controller/metal/redirecting.rb
@@ -65,6 +65,7 @@ module Redirecting
def redirect_to(options = {}, response_status = {}) #:doc:
raise ActionControllerError.new("Cannot redirect to nil!") unless options
raise AbstractController::DoubleRenderError if response_body
+ logger.debug { "Redirected by #{caller(1).first rescue "unknown"}" } if logger
self.status = _extract_redirect_to_status(options, response_status)
self.location = _compute_redirect_to_location(options)

0 comments on commit 7aa96a1

Please sign in to comment.
Something went wrong with that request. Please try again.