Sets_uuid is a project mainly written in Ruby, based on the MIT license.
Adds declarative uuid attribute initialization to models
= sets_uuid
Allows you to declaratively initialize UUID columns in your ActiveRecords.
class MyModel < ActiveRecord::Base sets_uuid :before_create, :guid => :compact end
m = MyModel.create! m.guid # => "a80cca5469254331a2f7df23da2b837f"
This gem requires the simple_uuid gem. The reason I picked this library instead of the classic uuid gem is because the later does not use a state file, which I find annoying in some situations.
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 Emmanuel Oga. See LICENSE for details.