Class: Pageflow::Chapter
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Pageflow::Chapter
- Includes:
- NestedRevisionComponent, SerializedConfiguration
- Defined in:
- app/models/pageflow/chapter.rb
Instance Attribute Summary collapse
-
#is_first ⇒ Object
Returns the value of attribute is_first.
Instance Method Summary collapse
Methods included from NestedRevisionComponent
Methods included from NestedRevisionComponent::Container
#copy_nested_revision_component_to
Methods included from SerializedConfiguration
Instance Attribute Details
#is_first ⇒ Object
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
#pages ⇒ Object
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 |