Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move `destroy_without_callbacks` under protected

  • Loading branch information...
commit dbfdd14eeeb185c8bafc00c97c379b600a7b621f 1 parent a53dc56
@mislav authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/is_paranoid.rb
View
12 lib/is_paranoid.rb
@@ -47,12 +47,6 @@ def self.find_only_destroyed *args
self.with_only_destroyed_scope { find(*args) }
end
- # Mark the model deleted_at as now.
- def destroy_without_callbacks
- self.deleted_at = Time.now.utc
- update_without_callbacks
- end
-
# Override the default destroy to allow us to flag deleted_at.
# This preserves the before_destroy and after_destroy callbacks.
# Because this is also called internally by Model.destroy_all and
@@ -74,6 +68,12 @@ def restore
end
protected
+
+ # Mark the model deleted_at as now.
+ def destroy_without_callbacks
+ self.deleted_at = Time.now.utc
+ update_without_callbacks
+ end
def self.with_only_destroyed_scope(&block)
with_exclusive_scope do
Please sign in to comment.
Something went wrong with that request. Please try again.