Add caller to request_uri deprecation notice

This commit is contained in:
Carlhuda
2010-03-03 16:23:00 -08:00
committed by Carl Lerche
parent 93422af5d5
commit 52efbdcdef
2 changed files with 2 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ module ActionDispatch
# Returns the request URI, accounting for server idiosyncrasies.
# WEBrick includes the full URL. IIS leaves REQUEST_URI blank.
def request_uri
ActiveSupport::Deprecation.warn "Using #request_uri is deprecated. Use fullpath instead."
ActiveSupport::Deprecation.warn "Using #request_uri is deprecated. Use fullpath instead.", caller
fullpath
end

View File

@@ -19,7 +19,7 @@ module Rails
def before_dispatch(env)
request = ActionDispatch::Request.new(env)
path = request.request_uri.inspect rescue "unknown"
path = request.fullpath.inspect rescue "unknown"
info "\n\nStarted #{request.method.to_s.upcase} #{path} " <<
"for #{request.remote_ip} at #{Time.now.to_s(:db)}"