Sha256: 4dbec55a21cdf90a6a7e2a52c7ef66342a4beafabb769a4efeb24fd6c4a8f1f6
Contents?: true
Size: 283 Bytes
Versions: 2
Compression:
Stored size: 283 Bytes
Contents
class ArticleArchive < ActiveRecord::Base has_many :comments, :class_name => 'CommentArchive', :foreign_key => 'article_id' 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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mover-0.2.2 | spec/fixtures/article_archive.rb |
mover-0.2.1 | spec/fixtures/article_archive.rb |