Sha256: dd92f2e31086e26ab6845af1a2108fe703885ffa09966490885a78230845992d
Contents?: true
Size: 1.02 KB
Versions: 18
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true module Decidim module Assemblies # A controller that holds the logic to show Assemblies in a # public layout. class AssembliesController < Decidim::ApplicationController layout "layouts/decidim/assembly", only: [:show] before_action -> { extend NeedsAssembly }, only: [:show] helper Decidim::AttachmentsHelper helper Decidim::IconHelper helper Decidim::WidgetUrlsHelper helper_method :collection, :promoted_assemblies, :assemblies, :stats def index authorize! :read, Assembly end def show authorize! :read, current_assembly end private def assemblies @assemblies ||= OrganizationPrioritizedAssemblies.new(current_organization) end alias collection assemblies def promoted_assemblies @promoted_assemblies ||= assemblies | PromotedAssemblies.new end def stats @stats ||= AssemblyStatsPresenter.new(assembly: current_assembly) end end end end
Version data entries
18 entries across 18 versions & 2 rubygems