Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

destroy marks AR object as @destroyed

  • Loading branch information...
commit 06b8d8f93130674b5e1d732155e298d16085556b 1 parent 0fe40b6
David Reese whatcould authored
1  lib/acts_as_archive/base/destroy.rb
View
@@ -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
5 spec/acts_as_archive/base/destroy_spec.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.