Module: Sequel::Plugins::AssociationDependencies::InstanceMethods

Module | Sequel::Plugins::AssociationDependencies::InstanceMethods
In: | lib/sequel/plugins/association_dependencies.rb

### Methods

after_destroy before_destroy

### Public Instance methods

after_destroy()

Run the delete and destroy association dependency actions for many_to_one associations.

[Source]

        # File lib/sequel/plugins/association_dependencies.rb, line 79
    79:         def after_destroy
    80:           super
    81:           model.association_dependencies[:after_delete].each{|m| send(m).delete}
    82:           model.association_dependencies[:after_destroy].each{|m| send(m).destroy}
    83:         end

before_destroy()

Run the delete, destroy, and nullify association dependency actions for *_to_many associations.

[Source]

        # File lib/sequel/plugins/association_dependencies.rb, line 87
    87:         def before_destroy
    88:           model.association_dependencies[:before_delete].each{|m| send(m).delete}
    89:           model.association_dependencies[:before_destroy].each{|m| send(m).destroy}
    90:           model.association_dependencies[:before_nullify].each{|m| send(m)}
    91:           super
    92:         end

[Validate]