mover 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +0,0 @@
1
- class Article < ActiveRecord::Base
2
- has_many :comments
3
- before_move :ArticleArchive do
4
- comments.each { |c| c.move_to(CommentArchive) }
5
- end
6
- before_copy :ArticleArchive do
7
- comments.each { |c| c.copy_to(CommentArchive) }
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class ArticleArchive < ActiveRecord::Base
2
- has_many :comments, :class_name => 'CommentArchive', :foreign_key => 'article_id'
3
- before_move :Article do
4
- comments.each { |c| c.move_to(Comment) }
5
- end
6
- before_copy :Article do
7
- comments.each { |c| c.copy_to(Comment) }
8
- end
9
- end
@@ -1,3 +0,0 @@
1
- class Comment < ActiveRecord::Base
2
- belongs_to :article
3
- end
@@ -1,3 +0,0 @@
1
- class CommentArchive < ActiveRecord::Base
2
- belongs_to :article, :class_name => 'ArticleArchive', :foreign_key => 'article_id'
3
- end