lib/is_paranoid.rb in semanticart-is_paranoid-0.9.4 vs lib/is_paranoid.rb in semanticart-is_paranoid-0.9.5
- old
+ new
@@ -207,11 +207,11 @@
old_method_missing(name, *args, &block)
end
end
# Mark the model deleted_at as now.
- def destroy_without_callbacks
+ def alt_destroy_without_callbacks
self.class.update_all(
"#{destroyed_field} = #{self.class.connection.quote(( field_destroyed.respond_to?(:call) ? field_destroyed.call : field_destroyed))}",
self.class.primary_key.to_sym => self.id
)
self
@@ -222,10 +222,10 @@
# Because this is also called internally by Model.destroy_all and
# the Model.destroy(id), we don't need to specify those methods
# separately.
def destroy
return false if callback(:before_destroy) == false
- result = destroy_without_callbacks
+ result = alt_destroy_without_callbacks
callback(:after_destroy)
self
end
# Set deleted_at flag on a model to field_not_destroyed, effectively