Sha256: d0d5e7597a67a5940abebb823efa76060ad196c5a17655cf352c97c5214ea62c
Contents?: true
Size: 577 Bytes
Versions: 27
Compression:
Stored size: 577 Bytes
Contents
# frozen_string_literal: true module Decidim module Assemblies # This module, when injected into a controller, ensures there's a # Assembly available and deducts it from the context. module AssemblyContext def self.extended(base) base.class_eval do include NeedsAssembly layout "layouts/decidim/assembly" before_action do authorize! :read, current_assembly end end end def ability_context super.merge(current_assembly: current_assembly) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems