Merge pull request #2379 from Robsteranium/patch-1
guid default of "" never gets set to a secure random hex (in mysql at least)
This commit is contained in:
commit
8212268b99
1 changed files with 1 additions and 1 deletions
|
|
@ -9,6 +9,6 @@ module Diaspora::Guid
|
||||||
|
|
||||||
# @return [String] The model's guid.
|
# @return [String] The model's guid.
|
||||||
def set_guid
|
def set_guid
|
||||||
self.guid ||= ActiveSupport::SecureRandom.hex(8)
|
self.guid = ActiveSupport::SecureRandom.hex(8) if self.guid.blank?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue