Skip to content

An AR abstract superclass that features UUID as an id instead of the default integer

License

Notifications You must be signed in to change notification settings

rubyisbeautiful/globally_unique_record

Repository files navigation

globally_unique_record

Globally Unique Record is meant to be used as a dropin replacement for the standard default ActiveRecord::Base class.

The principal difference is the default :id attribute is a String not an Integer. It is automatically generated using UUIDTools at 36 characters upon creation.

The idea is to provide the basis only for core data sets that will exist between multiple global applications. For example, a building in Singapore is always the same building in Singapore, and so should retain the same id regardless.

Upcoming features

  • Generator

  • Specs

Usage

class Foo < GloballyUniqueRecord end

>> @foo = Foo.create

> <Foo id:01234567890123456.…>

Copyright © 2011 Bryan Taylor. See LICENSE.txt for further details.

About

An AR abstract superclass that features UUID as an id instead of the default integer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages