Sha256: a67387cf796170949445d348dae123ca0b8fd7b8281293de597f56c64934849b

Contents?: true

Size: 638 Bytes

Versions: 41

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    class WidgetsController < Decidim::WidgetsController
      helper Decidim::SanitizeHelper

      private

      def model
        return unless params[:participatory_process_slug]

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

      def current_participatory_space
        model
      end

      def iframe_url
        @iframe_url ||= participatory_process_widget_url(model)
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.25.2 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.25.1 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.25.0 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.25.0.rc4 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.25.0.rc3 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.25.0.rc2 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.25.0.rc1 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.24.3 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.6 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.24.2 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.5 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.24.1 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.24.0 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.24.0.rc2 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.4 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.24.0.rc1 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.3 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.2 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.1 app/controllers/decidim/participatory_processes/widgets_controller.rb
decidim-participatory_processes-0.23.1.rc1 app/controllers/decidim/participatory_processes/widgets_controller.rb