diff --git a/lib/paranoia.rb b/lib/paranoia.rb index 489d2d62..51b49fe1 100644 --- a/lib/paranoia.rb +++ b/lib/paranoia.rb @@ -143,7 +143,7 @@ def really_destroy! association_data.really_destroy! end end - write_attribute(paranoia_column, current_time_from_proper_timezone) + assign_attributes(paranoia_destroy_attributes) destroy_without_paranoia end end diff --git a/test/paranoia_test.rb b/test/paranoia_test.rb index a1bceeee..fbbf2cfa 100644 --- a/test/paranoia_test.rb +++ b/test/paranoia_test.rb @@ -489,6 +489,12 @@ def test_really_destroy refute ParanoidModel.unscoped.exists?(model.id) end + def test_really_destroy_for_active_column_model + model = ActiveColumnModel.create + model.really_destroy! + refute ActiveColumnModel.unscoped.exists?(model.id) + end + def test_real_destroy_dependent_destroy parent = ParentModel.create child1 = parent.very_related_models.create