Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/whatcould/acts_as_archive
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Feb 21, 2010
2 parents 26a1639 + 06b8d8f commit 7e78020
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/acts_as_archive/base/destroy.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def destroy_without_callbacks
unless new_record? unless new_record?
self.class.copy_to_archive("#{self.class.primary_key} = #{id}") self.class.copy_to_archive("#{self.class.primary_key} = #{id}")
end end
@destroyed = true
freeze freeze
end end


Expand Down
5 changes: 5 additions & 0 deletions spec/acts_as_archive/base/destroy_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
article_match?(original, copy) article_match?(original, copy)
end end
end end

it "should mark the object as destroyed" do
@articles[3].send(d)
@articles[3].destroyed?.should == true
end
end end
end end
end end

0 comments on commit 7e78020

Please sign in to comment.