module Sequel::Plugins::AssociationDependencies::InstanceMethods

  1. lib/sequel/plugins/association_dependencies.rb

Methods

Public Instance

  1. after_destroy
  2. before_destroy

Public Instance methods

after_destroy()

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

[show source]
   # File lib/sequel/plugins/association_dependencies.rb
89 def after_destroy
90   super
91   model.association_dependencies[:after_delete].each{|m| public_send(m).delete}
92   model.association_dependencies[:after_destroy].each{|m| public_send(m).destroy}
93 end
before_destroy()

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

[show source]
    # File lib/sequel/plugins/association_dependencies.rb
 97 def before_destroy
 98   model.association_dependencies[:before_delete].each{|m| public_send(m).delete}
 99   model.association_dependencies[:before_destroy].each{|m| public_send(m).destroy}
100   model.association_dependencies[:before_nullify].each{|args| public_send(*args)}
101   super
102 end