Sha256: 2955ec60f041512fecee5dba52876f3c7abe1e30968450cd95558251010ea3cc
Contents?: true
Size: 434 Bytes
Versions: 18
Compression:
Stored size: 434 Bytes
Contents
module Pageflow class Chapter < ActiveRecord::Base belongs_to :storyline, touch: true has_many :pages, -> { order('position ASC') } delegate :entry, to: :storyline serialize :configuration, JSON def configuration super || {} end def copy_to(storyline) chapter = dup storyline.chapters << chapter pages.each do |page| page.copy_to(chapter) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems