Class: Decidim::PagesController

Inherits:
ApplicationController show all
Includes:
HighVoltage::StaticPage
Defined in:
app/controllers/decidim/pages_controller.rb

Overview

This controller serves static pages using HighVoltage.

Instance Method Summary collapse

Instance Method Details

#highlighted_participatory_processesObject



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

#indexObject



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_finderObject



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


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