Module: UuidBaseHelper

Defined in:
lib/active_record_uuid/uuid_base_helper.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/active_record_uuid/uuid_base_helper.rb', line 2

def self.included(base)
  warn "[DEPRECATION] `UuidBaseHelper` and `ActiveRecord::UuidBase` are deprecated.  Please inherit from `ActiveRecord::Base` and use `has_uuid` instead."
  
  base.send(:include, ActiveRecordUuid::Model)
  base.uuid_config do
    primary_key true
    association true
    hook        :before_create
  end
end