Class: PagesCore::FrontendController

Inherits:
ApplicationController show all
Includes:
ApplicationHelper, DocumentTitleController
Defined in:
app/controllers/pages_core/frontend_controller.rb

Direct Known Subclasses

FrontendController

Instance Attribute Summary

Attributes included from Authentication

#current_user

Instance Method Summary collapse

Methods included from ApplicationHelper

#page_link, #unique_page

Methods included from PagePathHelper

#page_path, #page_url

Methods included from ImagesHelper

#dynamic_image_tag, #image_caption, #image_figure, #original_dynamic_image_tag, #picture, #picture_tag, #uncropped_dynamic_image_tag

Methods included from AttachmentsHelper

#attachment_path, #download_attachment_path

Methods included from DocumentTitleController

#document_title

Methods included from StaticCacheController

#disable_static_cache!, #static_cached?

Methods included from PoliciesHelper

#policy, #verify_policy, #verify_policy_with_proc

Methods included from ProcessTitler

inc_number_of_requests, original_title

Methods included from LocalesHelper

#content_locale

Methods included from ErrorRenderer

#render_error

Methods included from Authentication

#authenticate!, #deauthenticate!, #logged_in?

Instance Method Details

#load_root_pagesObject

Loads @root_pages and @rss_feeds. To automatically load these in your own controllers, add the following line to your controller definition:

before_action :load_root_pages


17
18
19
20
21
22
# File 'app/controllers/pages_core/frontend_controller.rb', line 17

def load_root_pages
  @root_pages = Page.roots.localized(content_locale).published
  @rss_feeds = Page.where(feed_enabled: true)
                   .localized(content_locale)
                   .published
end