spec/fixtures/article.rb in mover-0.2.0 vs spec/fixtures/article.rb in mover-0.2.1
- old
+ new
@@ -1,6 +1,9 @@
class Article < ActiveRecord::Base
has_many :comments
- before_move_to :ArticleArchive do
+ before_move :ArticleArchive do
comments.each { |c| c.move_to(CommentArchive) }
+ end
+ before_copy :ArticleArchive do
+ comments.each { |c| c.copy_to(CommentArchive) }
end
end
\ No newline at end of file