Sha256: 21eb825a5a26df9f8c9512af9cda7e5b08739ebf8b439bdc0227ab32c4e6183d

Contents?: true

Size: 241 Bytes

Versions: 2

Compression:

Stored size: 241 Bytes

Contents

class Article < ActiveRecord::Base
  has_many :comments
  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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mover-0.2.2 spec/fixtures/article.rb
mover-0.2.1 spec/fixtures/article.rb