jasonfox / acts_as_universally_unique Goto Github PK
View Code? Open in Web Editor NEWAdds a universally unique identier (UUID) field to any ActiveRecord model.
Home Page: www.jasonfox.com
License: MIT License
Adds a universally unique identier (UUID) field to any ActiveRecord model.
Home Page: www.jasonfox.com
License: MIT License
ActsAsUniversallyUnique ======================= This plugin adds a UUID field to the models that acts_as_universally_unique. This plugin relies on the UUID gem: http://github.com/assaf/uuid/tree/master. You can read more about UUIDs here: http://en.wikipedia.org/wiki/Uuid. Please note that the UUID gem maintains a state file which is created in /var/tmp/ruby-uuid or the Windows common application data directory using mode 0644. If that directory is not writable, the file is created as .ruby-uuid in the home directory. State files are not portable across machines. For more information see: http://github.com/assaf/uuid/tree/master. Options ======= column The database column to store the UUID value in. format One of the following (the default is :compact): :compact => '%08x%04x%04x%04x%012x', :expanded => '%08x-%04x-%04x-%04x-%012x', :urn => 'urn:uuid:%08x-%04x-%04x-%04x-%012x' Example ======= class Customer < ActiveRecord::Base acts_as_universally_unique :column => :access_key end $ script/console >> c = Customer.create! >> c.access_key => ab57bba0e968012bf7e6002332b9705e Copyright (c) 2009 Jason Fox, www.jasonfox.com, Released under the MIT license
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.