Sha256: 93852ae268c9e660657d698a3a998afafccf1f39ee34e13f79ace05ed5988233

Contents?: true

Size: 947 Bytes

Versions: 77

Compression:

Stored size: 947 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    # A controller that holds the logic to show ParticipatoryProcessSteps in a
    # public layout.
    class ParticipatoryProcessStepsController < Decidim::ParticipatoryProcesses::ApplicationController
      include ParticipatorySpaceContext
      participatory_space_layout only: :index

      def index; end

      private

      def organization_participatory_processes
        @organization_participatory_processes ||= OrganizationParticipatoryProcesses.new(current_organization).query
      end

      def current_participatory_space
        return unless params[:participatory_process_slug]

        @current_participatory_space ||= organization_participatory_processes.where(slug: params[:participatory_process_slug]).or(
          organization_participatory_processes.where(id: params[:participatory_process_slug])
        ).first!
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.27.9 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.8 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.7 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.6 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.10 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.9 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.5 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.8 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.4 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.3 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.7 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.5 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.2 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.1 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.4 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.0 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.3 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.0.rc2 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.27.0.rc1 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb
decidim-participatory_processes-0.26.2 app/controllers/decidim/participatory_processes/participatory_process_steps_controller.rb