Skip to content

Provides facilities to utilize UUIDs with ActiveRecord, including model and migration extensions.

License

Notifications You must be signed in to change notification settings

derekatkins/with_uuid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WithUuid

Provides facilities to utilize UUIDs with ActiveRecord, including model and migration extensions.

Installation

Add this line to your application's Gemfile:

gem 'with_uuid'

And then execute:

$ bundle

Or install it yourself as:

$ gem install with_uuid

Usage

In a migration:

create_table "comments", :id => false, :force => true do |t|
  t.uuid     "id",      :primary_key => true 
  t.uuid     "post_id",                       :null => false
end

In a model:

class Posts < ActiveRecord::Base
  include WithUuid::Model

  # ...
end

About

Provides facilities to utilize UUIDs with ActiveRecord, including model and migration extensions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%