Sha256: a92487f67f108f952fe07529abe5ab6c4539ce48418bd55bf059d0c0a793ab42
Contents?: true
Size: 578 Bytes
Versions: 41
Compression:
Stored size: 578 Bytes
Contents
module Pageflow class Storyline < ApplicationRecord include SerializedConfiguration include RevisionComponent belongs_to :revision, touch: true 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
41 entries across 41 versions & 1 rubygems