On 15 March 2011 13:37, Martin Streicher <martin.streic...@gmail.com> wrote:
> I use this often:
>
> class Uuid
>  def self.uuid
>    return rand( 18446744073709551615 ).to_s( 36 ).rjust( 13, '0' )
>  end
> end

Nice, simple process (assuming it works... I've not tried it), but I
don't think it has much to do with the topic of this thread, and it's
not likely to create a *real* UUID (RFC4122)  is it?

This old thread discusses it a bit:
http://www.ruby-forum.com/topic/164078

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to