Class: SetPage

Inherits:
Page
  • Object
show all
Defined in:
app/models/set_page.rb

Constant Summary

Constants inherited from Page

Page::CACHED_VIRTUAL_PAGES

Instance Attribute Summary

Attributes included from Slices::Tree

#external_url, #path, #position, #show_in_nav

Instance Method Summary collapse

Methods inherited from Page

#as_json, available_layouts, #available_layouts, #cache_virtual_page, #cacheable_virtual_page?, #description, #description=, #entry?, find_by_id, find_by_id!, find_virtual, make, role_for_status, #set_keywords, #set_page?, #set_slice, #sets, #template, #update_attributes, #virtual?

Methods included from Slices::HasAttachments::PageInstanceMethods

#attachment_assets, #slice_attachment_asset_ids

Methods included from Slices::HasSlices

#embeded_slices, #messages_from_errors, #ordered_slices_for, #slice_errors_for, #slices_for, #update_attributes, #validate_slices

Methods included from Slices::Tree

#ancestors, #children, #descended_from?, #entry_children, #first_sibling?, #generate_path, #home?, #last_sibling?, minimal, #navigable_children, #navigation_path, #next_sibling, #page_children, #parent, #parent=, #peers, #permalink, #previous_sibling, #siblings, #siblings_by_position, #update_path_for_children

Instance Method Details

#entries(type) ⇒ Object



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

def entries(type)
  children.criteria.where(_type: type.to_s.classify)
end

#entry_typesObject



5
6
7
# File 'app/models/set_page.rb', line 5

def entry_types
  sets.map { |set| set.entry_type }
end