Sha256: 4c0ef54fc437ed3970a4fbfba8746f27f9c3cba7e618ae022bde6d664d98f09b
Contents?: true
Size: 915 Bytes
Versions: 9
Compression:
Stored size: 915 Bytes
Contents
# frozen_string_literal: true require_dependency "decidim/page_finder" module Decidim # This controller serves static pages using HighVoltage. class PagesController < Decidim::ApplicationController include HighVoltage::StaticPage layout "layouts/decidim/application" authorize_resource :public_pages, class: false delegate :page, to: :page_finder helper_method :page, :stats helper CtaButtonHelper helper Decidim::SanitizeHelper skip_before_action :store_current_location 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 def page_finder @page_finder ||= Decidim::PageFinder.new(params[:id], current_organization) end private def stats @stats ||= HomeStatsPresenter.new(organization: current_organization) end end end
Version data entries
9 entries across 9 versions & 1 rubygems