Class: Decidim::PagesController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::PagesController
- Defined in:
- app/controllers/decidim/pages_controller.rb
Overview
This controller serves static pages using HighVoltage.
Instance Method Summary collapse
Methods included from NeedsSnippets
Methods included from HttpCachingDisabler
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#index ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/decidim/pages_controller.rb', line 14 def index :read, :public_page @topics = StaticPageTopic.where(organization: current_organization) @orphan_pages = StaticPage.where(topic: nil, organization: current_organization) end |
#show ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/decidim/pages_controller.rb', line 20 def show @page = current_organization.static_pages.find_by!(slug: params[:id]) :read, :public_page, page: @page @topic = @page.topic @pages = @topic&.pages end |