Class: PagesCore::Frontend::PagesController

Inherits:
FrontendController show all
Includes:
PagesCore::FrontendHelper, Pages::PreviewController, Pages::RssController, Templates::ControllerActions
Defined in:
app/controllers/pages_core/frontend/pages_controller.rb

Direct Known Subclasses

PagesController

Instance Attribute Summary

Attributes included from PagesCore::FrontendHelper

#search_query

Attributes included from Authentication

#current_user

Instance Method Summary collapse

Methods included from Pages::PreviewController

#preview, #preview?

Methods included from PageParameters

#page_attachment_attributes, #page_content_attributes, #page_static_attributes

Methods included from Templates::ControllerActions

#run_template_actions_for

Methods included from PagesCore::FrontendHelper

#root_page, #root_pages

Methods included from HeadTagsHelper

#document_title_tag, #head_tag, #meta_image_url, #pages_meta_tags

Methods included from PagesCore::FeedTagsHelper

#feed_tags

Methods inherited from PagesCore::FrontendController

#load_root_pages

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

#indexObject



19
20
21
22
23
24
25
26
27
# File 'app/controllers/pages_core/frontend/pages_controller.rb', line 19

def index
  respond_to do |format|
    format.html { render_published_page(root_pages.try(&:first)) }
    format.rss do
      render_rss(all_feed_items.paginate(per_page: per_page_rss_param,
                                         page: page_param))
    end
  end
end

#showObject



29
30
31
32
33
34
35
# File 'app/controllers/pages_core/frontend/pages_controller.rb', line 29

def show
  respond_to do |format|
    format.html { render_published_page(@page) }
    format.json { render json: PageResource.new(@page) }
    format.rss { render_page_rss(@page, page_param) }
  end
end