Skip to content

Commit

Permalink
Merge pull request #4095 from arunagw/using_uuid
Browse files Browse the repository at this point in the history
Using uuid which is supported in 1.9
  • Loading branch information
josevalim committed Dec 21, 2011
2 parents 893d38d + 0f510e9 commit 1f75a1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/middleware/request_id.rb
Expand Up @@ -33,7 +33,7 @@ def external_request_id(env)
end

def internal_request_id
SecureRandom.hex(16)
SecureRandom.uuid
end
end
end
2 changes: 1 addition & 1 deletion actionpack/test/dispatch/request_id_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 1f75a1f

Please sign in to comment.