Module Sequel::Plugins::ValidateAssociated
In: lib/sequel/plugins/validate_associated.rb

The validates_associated plugin allows you to validate associated objects. It also offers the ability to delay the validation of associated objects until the current object is validated. If the associated object is invalid, validation error messages from the associated object will be added to the current object‘s validation errors.

Usage:

  # Make all model subclass support validating associated objects
  Sequel::Model.plugin :validate_associated

  # Make the Album class support validating associated objects
  Album.plugin :validate_associated

Methods

apply  

Classes and Modules

Module Sequel::Plugins::ValidateAssociated::InstanceMethods

Public Class methods

Depend on the instance_hooks plugin.

[Source]

    # File lib/sequel/plugins/validate_associated.rb, line 21
21:       def self.apply(mod)
22:         mod.plugin :instance_hooks
23:       end

[Validate]