Sha256: 98319ab7e7c9f64490d76de169b8b250b6cb7c7957ece5036d38cfb25bec19de
Contents?: true
Size: 385 Bytes
Versions: 3
Compression:
Stored size: 385 Bytes
Contents
module DestroyedAt module HasOneAssociation def delete(method = options[:dependent]) if DestroyedAt.has_destroy_at?(target) && load_target && method == :destroy DestroyedAt.destroy_target_of_association(owner, target) else super end end end end ActiveRecord::Associations::HasOneAssociation.send(:prepend, DestroyedAt::HasOneAssociation)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
destroyed_at-2.0.0 | lib/destroyed_at/has_one_association.rb |
destroyed_at-1.0.2 | lib/destroyed_at/has_one_association.rb |
destroyed_at-1.0.1 | lib/destroyed_at/has_one_association.rb |