Commit 763e8aee by Ryan Bigg

Remove freezing as it breaks Devise (see #41)

If you care about having objects frozen after calling destroy/delete, then please call freeze on that object manually.
parent 2f09ea2c
...@@ -21,7 +21,6 @@ module Paranoia ...@@ -21,7 +21,6 @@ module Paranoia
def delete def delete
update_attribute_or_column(:deleted_at, Time.now) if !deleted? && persisted? update_attribute_or_column(:deleted_at, Time.now) if !deleted? && persisted?
freeze
end end
def restore! def restore!
......
...@@ -54,7 +54,6 @@ class ParanoiaTest < Test::Unit::TestCase ...@@ -54,7 +54,6 @@ class ParanoiaTest < Test::Unit::TestCase
model.destroy model.destroy
assert_equal true, model.deleted_at.nil? assert_equal true, model.deleted_at.nil?
assert model.frozen?
assert_equal 0, model.class.count assert_equal 0, model.class.count
assert_equal 0, model.class.unscoped.count assert_equal 0, model.class.unscoped.count
...@@ -68,7 +67,6 @@ class ParanoiaTest < Test::Unit::TestCase ...@@ -68,7 +67,6 @@ class ParanoiaTest < Test::Unit::TestCase
model.destroy model.destroy
assert_equal false, model.deleted_at.nil? assert_equal false, model.deleted_at.nil?
assert model.frozen?
assert_equal 0, model.class.count assert_equal 0, model.class.count
assert_equal 1, model.class.unscoped.count assert_equal 1, model.class.unscoped.count
......
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