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:
Daniel Grippi 2011-12-02 10:47:24 -08:00
commit 8212268b99

View file

@ -9,6 +9,6 @@ module Diaspora::Guid
# @return [String] The model's guid.
def set_guid
self.guid ||= ActiveSupport::SecureRandom.hex(8)
self.guid = ActiveSupport::SecureRandom.hex(8) if self.guid.blank?
end
end