Class: Decidim::PagesController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::PagesController
- Includes:
- HighVoltage::StaticPage
- Defined in:
- app/controllers/decidim/pages_controller.rb
Overview
This controller serves static pages using HighVoltage.
Instance Method Summary collapse
- #highlighted_participatory_processes ⇒ Object
- #index ⇒ Object
- #page_finder ⇒ Object
- #promoted_participatory_processes ⇒ Object
Instance Method Details
#highlighted_participatory_processes ⇒ Object
32 33 34 35 |
# File 'app/controllers/decidim/pages_controller.rb', line 32 def highlighted_participatory_processes @highlighted_participatory_processes ||= OrganizationParticipatoryProcesses.new(current_organization) | HighlightedParticipatoryProcesses.new end |
#index ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/decidim/pages_controller.rb', line 17 def index @pages = current_organization.static_pages.all.to_a.sort do |a, b| a.title[I18n.locale.to_s] <=> b.title[I18n.locale.to_s] end end |
#page_finder ⇒ Object
23 24 25 |
# File 'app/controllers/decidim/pages_controller.rb', line 23 def page_finder @page_finder ||= Decidim::PageFinder.new(params[:id], current_organization) end |
#promoted_participatory_processes ⇒ Object
27 28 29 30 |
# File 'app/controllers/decidim/pages_controller.rb', line 27 def promoted_participatory_processes @promoted_participatory_processes ||= OrganizationPrioritizedParticipatoryProcesses.new(current_organization) | PromotedParticipatoryProcesses.new end |