Module: Sequel::Plugins::Uuid
- Defined in:
- lib/sequel/plugins/uuid.rb
Overview
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.configure(model, opts = OPTS) ⇒ Object
Configure the plugin by setting the available options.
Class Method Details
.configure(model, opts = OPTS) ⇒ Object
Configure the plugin by setting the available options. Note that if this method is run more than once, previous settings are ignored, and it will just use the settings given or the default settings. Options:
- :field
-
The field to hold the uuid (default: :uuid)
- :force
-
Whether to overwrite an existing uuid (default: false)
24 25 26 27 28 29 |
# File 'lib/sequel/plugins/uuid.rb', line 24 def self.configure(model, opts=OPTS) model.instance_exec do @uuid_field = opts[:field]||:uuid @uuid_overwrite = opts[:force]||false end end |