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