Sha256: d6c2e8b77f40b6fca8aa7a7b514e6d53cb87a1bb7bf612474bdcc4cf7f9ca671
Contents?: true
Size: 428 Bytes
Versions: 19
Compression:
Stored size: 428 Bytes
Contents
module Pageflow class Chapter < ApplicationRecord include SerializedConfiguration belongs_to :storyline, touch: true has_many :pages, -> { order('position ASC') }, dependent: :destroy, inverse_of: :chapter 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
19 entries across 19 versions & 1 rubygems