Class: Decidim::PagesController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::PagesController
- Defined in:
- decidim-core/app/controllers/decidim/pages_controller.rb
Overview
This controller serves static pages using HighVoltage.
Instance Method Summary collapse
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from Headers::HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#index ⇒ Object
14 15 16 17 18 |
# File 'decidim-core/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 'decidim-core/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 |