Class: PagesCore::FrontendController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- BaseController
- ApplicationController
- PagesCore::FrontendController
- Includes:
- ApplicationHelper
- Defined in:
- app/controllers/pages_core/frontend_controller.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Authentication
Instance Method Summary collapse
-
#load_root_pages ⇒ Object
Loads @root_pages and @rss_feeds.
Methods included from ApplicationHelper
Methods included from PagePathHelper
Methods included from OpenGraphTagsHelper
#open_graph_properties, #open_graph_tags
Methods included from MetaTagsHelper
#default_meta_image, #default_meta_image?, #meta_description, #meta_description?, #meta_image, #meta_image?, #meta_keywords, #meta_keywords?
Methods included from ImagesHelper
#dynamic_image_tag, #original_dynamic_image_tag, #uncropped_dynamic_image_tag
Methods included from HeadTagsHelper
#document_title, #document_title?, #feed_tags, #google_analytics_tags, #head_tag, #rss_link_tag, #typekit_tags
Methods included from AttachmentsHelper
#attachment_path, #download_attachment_path, #page_file_path
Methods included from StaticCacheController
Methods included from PoliciesHelper
#policy, #verify_policy, #verify_policy_with_proc
Methods included from ProcessTitler
inc_number_of_requests, original_title
Methods included from ErrorRenderer
Methods included from Authentication
#authenticate!, #deauthenticate!, #logged_in?
Instance Method Details
#load_root_pages ⇒ Object
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
15 16 17 18 |
# File 'app/controllers/pages_core/frontend_controller.rb', line 15 def load_root_pages @root_pages = Page.roots.localized(@locale).published @rss_feeds = Page.where(feed_enabled: true).localized(@locale).published end |