Class: Pageflow::Page

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AutoGeneratedPermaId

#ensure_perma_id

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.



9
10
11
# File 'app/models/pageflow/page.rb', line 9

def is_first
  @is_first
end

Instance Method Details

#configuration=(value) ⇒ Object



23
24
25
26
# File 'app/models/pageflow/page.rb', line 23

def configuration=(value)
  self.display_in_navigation = value['display_in_navigation']
  super
end

#page_typeObject



19
20
21
# File 'app/models/pageflow/page.rb', line 19

def page_type
  Pageflow.config.page_types.find_by_name!(template)
end

#titleObject



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

def title
  configuration['title'].presence || configuration['additional_title']
end