ActsAsParanoid / acts_as_paranoid

ActiveRecord plugin allowing you to hide and restore records without actually deleting them.
MIT License
1.46k stars 191 forks source link

Emulate difference between `destroy` and `destroy!` in default ActiveRecord #221

Closed mvz closed 3 years ago

mvz commented 3 years ago

In ActiveRecord, destroy! raises ActiveRecord::RecordNotDestroyed if before_destroy aborts, whereas destroy just returns false. ActsAsParanoid should do the same.

leomayleomay commented 3 years ago

@mvz thank you for bringing this up, any plan on this? cheers

mvz commented 3 years ago

No, there's no work in progress on this. Pull requests welcome, of course.

leomayleomay commented 3 years ago

@mvz PR filed https://github.com/ActsAsParanoid/acts_as_paranoid/pull/240, please help to review, cheers

mvz commented 3 years ago

Fixed in #240