Module: Sequel::Plugins

Defined in:
lib/sequel/lib/sequel/model/plugins.rb,
lib/sequel/lib/sequel/plugins/touch.rb,
lib/sequel/lib/sequel/plugins/schema.rb,
lib/sequel/lib/sequel/plugins/caching.rb,
lib/sequel/lib/sequel/plugins/subclasses.rb,
lib/sequel/lib/sequel/plugins/timestamps.rb,
lib/sequel/lib/sequel/plugins/active_model.rb,
lib/sequel/lib/sequel/plugins/identity_map.rb,
lib/sequel/lib/sequel/plugins/serialization.rb,
lib/sequel/lib/sequel/plugins/force_encoding.rb,
lib/sequel/lib/sequel/plugins/instance_hooks.rb,
lib/sequel/lib/sequel/plugins/boolean_readers.rb,
lib/sequel/lib/sequel/plugins/lazy_attributes.rb,
lib/sequel/lib/sequel/plugins/typecast_on_load.rb,
lib/sequel/lib/sequel/plugins/many_through_many.rb,
lib/sequel/lib/sequel/plugins/nested_attributes.rb,
lib/sequel/lib/sequel/plugins/hook_class_methods.rb,
lib/sequel/lib/sequel/plugins/validation_helpers.rb,
lib/sequel/lib/sequel/plugins/association_proxies.rb,
lib/sequel/lib/sequel/plugins/tactical_eager_loading.rb,
lib/sequel/lib/sequel/plugins/class_table_inheritance.rb,
lib/sequel/lib/sequel/plugins/association_dependencies.rb,
lib/sequel/lib/sequel/plugins/single_table_inheritance.rb,
lib/sequel/lib/sequel/plugins/validation_class_methods.rb

Overview

Empty namespace that plugins should use to store themselves, so they can be loaded via Model.plugin.

Plugins should be modules with one of the following conditions:

  • A singleton method named apply, which takes a model, additional arguments, and an optional block. This is called once, the first time the plugin is loaded, with the arguments and block provide to the call to Model.plugin.

  • A module inside the plugin module named InstanceMethods, which will be included in the model class.

  • A module inside the plugin module named ClassMethods, which will extend the model class.

  • A module inside the plugin module named DatasetMethods, which will extend the model's dataset.

  • A singleton method named configure, which takes a model, additional arguments, and an optional block. This is called every time the Model.plugin method is called.

Defined Under Namespace

Modules: ActiveModel, AssociationDependencies, AssociationProxies, BooleanReaders, Caching, ClassTableInheritance, ForceEncoding, HookClassMethods, IdentityMap, InstanceHooks, LazyAttributes, ManyThroughMany, NestedAttributes, Schema, Serialization, SingleTableInheritance, Subclasses, TacticalEagerLoading, Timestamps, Touch, TypecastOnLoad, ValidationClassMethods, ValidationHelpers