Class: Pageflow::Chapter

Inherits:
ApplicationRecord show all
Includes:
SerializedConfiguration
Defined in:
app/models/pageflow/chapter.rb

Instance Method Summary collapse

Methods included from SerializedConfiguration

#configuration

Instance Method Details

#copy_to(storyline) ⇒ Object



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

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

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