1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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. # Returns the request URI, accounting for server idiosyncrasies.
# WEBrick includes the full URL. IIS leaves REQUEST_URI blank. # WEBrick includes the full URL. IIS leaves REQUEST_URI blank.
def request_uri 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 fullpath
end end

View file

@ -19,7 +19,7 @@ module Rails
def before_dispatch(env) def before_dispatch(env)
request = ActionDispatch::Request.new(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} " << info "\n\nStarted #{request.method.to_s.upcase} #{path} " <<
"for #{request.remote_ip} at #{Time.now.to_s(:db)}" "for #{request.remote_ip} at #{Time.now.to_s(:db)}"