Sha256: 5bb39573ab3945e1a7773b073208c660452247365a02396fed8342a3340f5412
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true module Decidim module Admin module Features # This controller is the abstract class from which all feature # controllers in their admin engines should inherit from. class BaseController < Admin::ApplicationController skip_authorize_resource include Concerns::ParticipatoryProcessAdmin include FeatureSettings helper Decidim::Admin::ExportsHelper helper_method :current_feature, :parent_path delegate :active_step, to: :current_participatory_process, prefix: false before_action except: [:index, :show] do authorize! :manage, current_feature end before_action on: [:index, :show] do authorize! :read, current_feature end def current_feature request.env["decidim.current_feature"] end def parent_path decidim_admin.participatory_process_features_path(current_participatory_process) end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems