Module: Miscellany::BatchedDestruction

Extended by:
ActiveSupport::Concern
Defined in:
lib/miscellany/active_record/batched_destruction.rb

Overview

TODO Write Specs

Defined Under Namespace

Classes: ClassCallbackExector

Instance Method Summary collapse

Instance Method Details

#destroy(*args, legacy: false, **kwargs) ⇒ Object



63
64
65
66
67
68
69
# File 'lib/miscellany/active_record/batched_destruction.rb', line 63

def destroy(*args, legacy: false, **kwargs)
  if legacy
    super(*args)
  else
    self.class.send(:bulk_destroy_internal, [self], **kwargs)
  end
end