Module: DestroyedAt::BelongsToAssociation

Defined in:
lib/destroyed_at/belongs_to_association.rb

Instance Method Summary collapse

Instance Method Details

#handle_dependencyObject



3
4
5
6
7
8
9
# File 'lib/destroyed_at/belongs_to_association.rb', line 3

def handle_dependency
  if load_target && options[:dependent] == :destroy
    DestroyedAt.destroy_target_of_association(owner, target)
  else
    super
  end
end