Class: Pageflow::Page
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Pageflow::Page
- Includes:
- AutoGeneratedPermaId, SerializedConfiguration
- Defined in:
- app/models/pageflow/page.rb
Instance Attribute Summary collapse
-
#is_first ⇒ Object
Returns the value of attribute is_first.
Instance Method Summary collapse
Methods included from AutoGeneratedPermaId
Methods included from SerializedConfiguration
Instance Attribute Details
#is_first ⇒ Object
Returns the value of attribute is_first.
8 9 10 |
# File 'app/models/pageflow/page.rb', line 8 def is_first @is_first end |
Instance Method Details
#configuration=(value) ⇒ Object
22 23 24 25 |
# File 'app/models/pageflow/page.rb', line 22 def configuration=(value) self. = value['display_in_navigation'] super end |
#copy_to(chapter) ⇒ Object
27 28 29 |
# File 'app/models/pageflow/page.rb', line 27 def copy_to(chapter) chapter.pages << dup end |
#page_type ⇒ Object
18 19 20 |
# File 'app/models/pageflow/page.rb', line 18 def page_type Pageflow.config.page_types.find_by_name!(template) end |
#title ⇒ Object
14 15 16 |
# File 'app/models/pageflow/page.rb', line 14 def title configuration['title'].presence || configuration['additional_title'] end |