module Sequel::Plugins::AssociationDependencies::InstanceMethods

Public Instance Methods

after_destroy() click to toggle source

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

Calls superclass method
# File lib/sequel/plugins/association_dependencies.rb, line 88
def after_destroy
  super
  model.association_dependencies[:after_delete].each{|m| public_send(m).delete}
  model.association_dependencies[:after_destroy].each{|m| public_send(m).destroy}
end
before_destroy() click to toggle source

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

Calls superclass method
# File lib/sequel/plugins/association_dependencies.rb, line 96
def before_destroy
  model.association_dependencies[:before_delete].each{|m| public_send(m).delete}
  model.association_dependencies[:before_destroy].each{|m| public_send(m).destroy}
  model.association_dependencies[:before_nullify].each{|p| instance_exec(&p)}
  super
end