Sha256: 10d9d76850138fa7525df97b95c36186c4422b69550571d16e1fc9d65467f2be

Contents?: true

Size: 529 Bytes

Versions: 10

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module DecidimAwesome
    # Abstract component class for components without any admin controllers (only settings)
    class BlankComponentController < Decidim::Components::BaseController
      # just redirects to settings
      def settings
        redirect_to EngineRouter.admin_proxy(component.participatory_space).edit_component_path(id: component)
      end

      private

      def component
        Decidim::Component.find(params[:component_id])
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-decidim_awesome-0.10.3 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.10.2 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.10.1 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.10.0 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.9.3 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.9.1 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.8.3 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.8.2 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.8.1 app/controllers/decidim/decidim_awesome/blank_component_controller.rb
decidim-decidim_awesome-0.8.0 app/controllers/decidim/decidim_awesome/blank_component_controller.rb