Permalink
Browse files

Merge branch 'master' of git://github.com/whatcould/acts_as_archive

  • Loading branch information...
2 parents 26a1639 + 06b8d8f commit 7e78020d3764b0d52eb8a78ca06d74c850cb6165 @winton winton committed Feb 21, 2010
Showing with 6 additions and 0 deletions.
  1. +1 −0 lib/acts_as_archive/base/destroy.rb
  2. +5 −0 spec/acts_as_archive/base/destroy_spec.rb
View
1 lib/acts_as_archive/base/destroy.rb
@@ -47,6 +47,7 @@ def destroy_without_callbacks
unless new_record?
self.class.copy_to_archive("#{self.class.primary_key} = #{id}")
end
+ @destroyed = true
freeze
end
View
5 spec/acts_as_archive/base/destroy_spec.rb
@@ -93,6 +93,11 @@
article_match?(original, copy)
end
end
+
+ it "should mark the object as destroyed" do
+ @articles[3].send(d)
+ @articles[3].destroyed?.should == true
+ end
end
end
end

0 comments on commit 7e78020

Please sign in to comment.