aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-15 19:51:33 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-15 19:51:33 -0300
commit19fae86fe028162f7c487b2822e02fa96b5b861b (patch)
tree35366ab68b1e748f0d32660f267aa65d0dd35d86 /activerecord/lib/active_record
parenta3ca700c58fa59722288a12960c4a6cd1ade6aea (diff)
downloadrails-19fae86fe028162f7c487b2822e02fa96b5b861b.tar.gz
rails-19fae86fe028162f7c487b2822e02fa96b5b861b.tar.bz2
rails-19fae86fe028162f7c487b2822e02fa96b5b861b.zip
Move uuid_v5 and uuid_v3 to Digest::UUID
These methods are not random so they should not belings to SecureRandom module.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/fixtures.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb
index 4cd5f92207..4306b36ae1 100644
--- a/activerecord/lib/active_record/fixtures.rb
+++ b/activerecord/lib/active_record/fixtures.rb
@@ -2,7 +2,7 @@ require 'erb'
require 'yaml'
require 'zlib'
require 'active_support/dependencies'
-require 'active_support/core_ext/securerandom'
+require 'active_support/core_ext/digest/uuid'
require 'active_record/fixture_set/file'
require 'active_record/errors'
@@ -551,7 +551,7 @@ module ActiveRecord
# Integer identifiers are values less than 2^30. UUIDs are RFC 4122 version 5 SHA-1 hashes.
def self.identify(label, column_type = :integer)
if column_type == :uuid
- SecureRandom.uuid_v5(SecureRandom::UUID_OID_NAMESPACE, label.to_s)
+ Digest::UUID.uuid_v5(Digest::UUID::OID_NAMESPACE, label.to_s)
else
Zlib.crc32(label.to_s) % MAX_ID
end