app/models/pageflow/chapter.rb in pageflow-0.9.2 vs app/models/pageflow/chapter.rb in pageflow-0.10.0
- old
+ new
@@ -1,20 +1,20 @@
module Pageflow
class Chapter < ActiveRecord::Base
- belongs_to :revision, :touch => true
+ belongs_to :storyline, touch: true
has_many :pages, -> { order('position ASC') }
- delegate :entry, :to => :revision
+ delegate :entry, to: :storyline
serialize :configuration, JSON
def configuration
super || {}
end
- def copy_to(revision)
+ def copy_to(storyline)
chapter = dup
- revision.chapters << chapter
+ storyline.chapters << chapter
pages.each do |page|
page.copy_to(chapter)
end
end