Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase of #412 #425

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/paranoia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def really_destroy!
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
Expand Down
8 changes: 8 additions & 0 deletions test/paranoia_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,14 @@ def test_really_destroy_behavior_for_callbacks
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
Expand Down