Module: Uuidable

Defined in:
lib/uuidable.rb,
lib/uuidable/version.rb,
lib/uuidable/migration.rb,
lib/uuidable/active_record.rb

Overview

Main module

Defined Under Namespace

Modules: ActiveRecord, Migration, TableDefinition

Constant Summary collapse

VERSION =
'0.2.2'.freeze
COLUMN_NAME =
:uuid
COLUMN_TYPE =
:binary
COLUMN_OPTIONS =
{ limit: 36, null: false }.freeze
INDEX_OPTIONS =
{ unique: true }.freeze

Class Method Summary collapse

Class Method Details

.generate_uuidObject



9
10
11
# File 'lib/uuidable.rb', line 9

def generate_uuid
  SecureRandom.uuid
end