Sha256: 76bd9064e6dfde4c3b4a257afb35b148b7a33f53bd5bb46698695d5db343a6f2
Contents?: true
Size: 723 Bytes
Versions: 27
Compression:
Stored size: 723 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses # This module, when injected into a controller, ensures there's a # Participatory Process available and deducts it from the context. module ParticipatoryProcessContext def self.extended(base) base.class_eval do include NeedsParticipatoryProcess layout "layouts/decidim/participatory_process" helper ParticipatoryProcessHelper before_action do authorize! :read, current_participatory_process end end end def ability_context super.merge(current_participatory_process: current_participatory_process) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems