Class: PagesCore::Frontend::PagesController
- Inherits:
-
FrontendController
- Object
- ActionController::Base
- BaseController
- ApplicationController
- PagesCore::FrontendController
- FrontendController
- PagesCore::Frontend::PagesController
- Includes:
- PagesCore::FrontendHelper, HeadTagsHelper, PreviewPagesController, RssController, Templates::ControllerActions
- Defined in:
- app/controllers/pages_core/frontend/pages_controller.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from PagesCore::FrontendHelper
#search_category_id, #search_query
Attributes included from Authentication
Instance Method Summary collapse
Methods included from PreviewPagesController
Methods included from HeadTagsHelper
#document_title, #document_title?, #feed_tags, #google_analytics_tags, #head_tag, #rss_link_tag, #typekit_tags
Methods included from Templates::ControllerActions
Methods included from PagesCore::FrontendHelper
Methods inherited from PagesCore::FrontendController
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 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
#index ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/pages_core/frontend/pages_controller.rb', line 20 def index respond_to do |format| format.html { render_published_page(root_pages.try(&:first)) } format.rss { render_rss(all_feed_items) } end end |
#show ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/pages_core/frontend/pages_controller.rb', line 27 def show respond_to do |format| format.html { render_published_page(@page) } format.json { render json: PageResource.new(@page) } format.rss do render_rss(@page.pages.limit(20).includes(:image, :author), title: @page.name) end end end |