diff --git a/app/controllers/decidim/iframe/blank_component_controller.rb b/app/controllers/decidim/iframe/blank_component_controller.rb index a5bad90..7736b87 100644 --- a/app/controllers/decidim/iframe/blank_component_controller.rb +++ b/app/controllers/decidim/iframe/blank_component_controller.rb @@ -6,13 +6,18 @@ module Iframe class BlankComponentController < Decidim::Components::BaseController # just redirects to settings def settings - redirect_to EngineRouter.admin_proxy(component.participatory_space).edit_component_path(id: component) + redirect_to EngineRouter.admin_proxy(current_component.participatory_space).edit_component_path(id: current_component) end private - def component - Decidim::Component.find(params[:component_id]) + def set_component_breadcrumb_item + context_breadcrumb_items << { + label: current_component.name, + url: EngineRouter.admin_proxy(current_component.participatory_space).edit_component_path(id: current_component), + active: false, + resource: current_component + } end end end diff --git a/lib/decidim/iframe/admin_engine.rb b/lib/decidim/iframe/admin_engine.rb index 8d8f2d7..ec4f71e 100644 --- a/lib/decidim/iframe/admin_engine.rb +++ b/lib/decidim/iframe/admin_engine.rb @@ -11,7 +11,6 @@ class AdminEngine < ::Rails::Engine routes do root to: "iframe#settings" - get "manage", to: "iframe#settings" end initializer "decidim_iframe.admin_mount_routes" do