Commit 3092f363 by John Hawthorn Committed by GitHub

Merge pull request #425 from jhawthorn/steverice-326-really-destroy-with-sentinel-value

Rebase of #412
parents ea0a0cee 97623f17
......@@ -165,7 +165,7 @@ module Paranoia
association_data.really_destroy!
end
end
write_attribute(paranoia_column, current_time_from_proper_timezone)
update_columns(paranoia_destroy_attributes)
destroy_without_paranoia
end
end
......
......@@ -546,6 +546,14 @@ class ParanoiaTest < test_framework
assert model.instance_variable_get(:@real_destroy_callback_called)
end
def test_really_destroy_behavior_for_active_column_model
model = ActiveColumnModel.new
model.save
model.really_destroy!
refute ParanoidModel.unscoped.exists?(model.id)
end
def test_really_delete
model = ParanoidModel.new
model.save
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment