Sha256: a00020214d6d331c641edf1efd0f6b052c8d1df30f07393edc02f7267e5c3f21
Contents?: true
Size: 539 Bytes
Versions: 13
Compression:
Stored size: 539 Bytes
Contents
module Pageflow class Storyline < ApplicationRecord include SerializedConfiguration include RevisionComponent has_many(:chapters, -> { order('pageflow_chapters.position ASC') }, dependent: :destroy, inverse_of: :storyline) has_many :pages, through: :chapters delegate :entry, to: :revision def copy_to(revision) storyline = dup revision.storylines << storyline chapters.each do |chapter| chapter.copy_to(storyline) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems