Skip to content
Browse files

Using uuid which is supported in 1.9

Orignal commit #ada78066fdbccffb1da092a2470211fa252b3c99
  • Loading branch information...
1 parent 893d38d commit 0f510e970f00ac819d331f0415db3ac5ada7b861 @arunagw arunagw committed Dec 21, 2011
View
2 actionpack/lib/action_dispatch/middleware/request_id.rb
@@ -33,7 +33,7 @@ def external_request_id(env)
end
def internal_request_id
- SecureRandom.hex(16)
+ SecureRandom.uuid
end
end
end
View
2 actionpack/test/dispatch/request_id_test.rb
@@ -14,7 +14,7 @@ class RequestIdTest < ActiveSupport::TestCase
end
test "generating a request id when none is supplied" do
- assert_match(/\w+/, stub_request.uuid)
+ assert_match /\w+-\w+-\w+-\w+-\w+/, stub_request.uuid
end
private

0 comments on commit 0f510e9

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