guid being set as "" somewhere (won't be assigned with ||= as "" is not nil).

This commit is contained in:
Robsteranium 2011-11-11 04:08:17 +00:00
parent ef075b7b15
commit f7bde9b654

View file

@ -10,5 +10,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