Class: Pageflow::Chapter

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/pageflow/chapter.rb

Instance Method Summary collapse

Instance Method Details

#copy_to(revision) ⇒ Object



8
9
10
11
12
13
14
15
# File 'app/models/pageflow/chapter.rb', line 8

def copy_to(revision)
  chapter = dup
  revision.chapters << chapter

  pages.each do |page|
    page.copy_to(chapter)
  end
end