Class: Decidim::PagesController
Overview
This controller serves static pages using HighVoltage.
Instance Method Summary
collapse
enhance_controller, extended, included
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 ||=
ParticipatoryProcesses::OrganizationPublishedParticipatoryProcesses.new(current_organization) | ParticipatoryProcesses::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
|
27
28
29
30
|
# File 'app/controllers/decidim/pages_controller.rb', line 27
def promoted_participatory_processes
@promoted_participatory_processes ||=
ParticipatoryProcesses::OrganizationPrioritizedParticipatoryProcesses.new(current_organization) | ParticipatoryProcesses::PromotedParticipatoryProcesses.new
end
|