aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/request.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 20:48:19 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 20:48:19 -0200
commita56db55e39781dd700555f784d230aff2dd1f714 (patch)
treeb21ca15b134ebacf5d5b64b44197bb630435c605 /actionpack/lib/action_dispatch/http/request.rb
parent14a6e179282010c62f87311f168fcb6a04a8b5ee (diff)
parent027d484f1d0c77855c09099091f7c3b5c976a7c0 (diff)
downloadrails-a56db55e39781dd700555f784d230aff2dd1f714.tar.gz
rails-a56db55e39781dd700555f784d230aff2dd1f714.tar.bz2
rails-a56db55e39781dd700555f784d230aff2dd1f714.zip
Merge branch 'dilizarov-feature/alias_request_uuid_method_to_request_id'
Fixes #16518
Diffstat (limited to 'actionpack/lib/action_dispatch/http/request.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index cadbfc88cb..07b3814ca4 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -50,7 +50,7 @@ module ActionDispatch
@original_fullpath = nil
@fullpath = nil
@ip = nil
- @uuid = nil
+ @request_id = nil
end
def check_path_parameters!
@@ -249,10 +249,12 @@ module ActionDispatch
#
# This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
# This relies on the rack variable set by the ActionDispatch::RequestId middleware.
- def uuid
- @uuid ||= env["action_dispatch.request_id"]
+ def request_id
+ @request_id ||= env["action_dispatch.request_id"]
end
+ alias_method :uuid, :request_id
+
# Returns the lowercase name of the HTTP server software.
def server_software
(@env['SERVER_SOFTWARE'] && /^([a-zA-Z]+)/ =~ @env['SERVER_SOFTWARE']) ? $1.downcase : nil