Sha256: f383bb7ff40a107c10a6c95dd5c6bad8a9dca575349a14c9d377462e78aef662
Contents?: true
Size: 429 Bytes
Versions: 4
Compression:
Stored size: 429 Bytes
Contents
# frozen_string_literal: true require "models/destroy_async_parent_soft_delete" class DlKeyedBelongsToSoftDelete < ActiveRecord::Base belongs_to :destroy_async_parent_soft_delete, dependent: :destroy_async, ensuring_owner_was: :deleted?, class_name: "DestroyAsyncParentSoftDelete" def deleted? deleted end def destroy update(deleted: true) run_callbacks(:destroy) end end
Version data entries
4 entries across 4 versions & 1 rubygems