Module: Bronze::Entities::PrimaryKeys::Uuid::ClassMethods
- Defined in:
- lib/bronze/entities/primary_keys/uuid.rb
Overview
Class methods to define when including PrimaryKeys::Uuid in a class.
Instance Method Summary collapse
-
#define_primary_key(attribute_name) ⇒ Attributes::Metadata
Defines a UUID primary key with the specified name.
Instance Method Details
#define_primary_key(attribute_name) ⇒ Attributes::Metadata
Defines a UUID primary key with the specified name.
39 40 41 |
# File 'lib/bronze/entities/primary_keys/uuid.rb', line 39 def define_primary_key(attribute_name) super(attribute_name, String, default: -> { SecureRandom.uuid }) end |