Sequel::Plugins::
SoftDeletes module
Extended With |
|
Plugin for adding soft-delete to a model.
== Example
Defining a model class with a timestamp as the deletion flag:
class ACME::User < Sequel::Model( :users )
plugin :soft_deletes, column: :deleted_at set_schema( :users ) do primary_key :id # ... timestamp :deleted_at end
end
Constants
- DEFAULT_OPTIONS
Default plugin options
Public Class Methods
Sequel
plugin API – called everytime the plugin is loaded into the class, after it is loaded into the class.