Class: Pageflow::Chapter

Inherits:
ApplicationRecord show all
Includes:
NestedRevisionComponent, SerializedConfiguration
Defined in:
app/models/pageflow/chapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from NestedRevisionComponent

#copy_to, #duplicate

Methods included from NestedRevisionComponent::Container

#copy_nested_revision_component_to

Methods included from SerializedConfiguration

#configuration

Instance Attribute Details

#is_firstObject

Returns the value of attribute is_first.



11
12
13
# File 'app/models/pageflow/chapter.rb', line 11

def is_first
  @is_first
end

Instance Method Details

#pagesObject



15
16
17
# File 'app/models/pageflow/chapter.rb', line 15

def pages
  super.tap { |p| p.first.is_first = true if is_first && p.present? }
end