You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cartodb/lib/carto/uuidhelper.rb

16 lines
235 B

require 'uuidtools'
module Carto
module UUIDHelper
def is_uuid?(text)
!(Regexp.new(%r{\A#{UUIDTools::UUID_REGEXP}\Z}) =~ text).nil?
end
def random_uuid
UUIDTools::UUID.random_create.to_s
end
end
end