Sha256: b6565d9ea73d9f0a3d3d8abe78246f2edec31e2de7b1a9512aaa4e91bc57a348
Contents?: true
Size: 406 Bytes
Versions: 7
Compression:
Stored size: 406 Bytes
Contents
module Pageflow class Chapter < ApplicationRecord include SerializedConfiguration belongs_to :storyline, touch: true has_many :pages, -> { order('position ASC') }, dependent: :destroy delegate :entry, to: :storyline def copy_to(storyline) chapter = dup storyline.chapters << chapter pages.each do |page| page.copy_to(chapter) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems