app/controllers/decidim/proposals/admin/participatory_texts_controller.rb in decidim-proposals-0.16.1 vs app/controllers/decidim/proposals/admin/participatory_texts_controller.rb in decidim-proposals-0.17.0

- old
+ new

@@ -25,11 +25,11 @@ @import = form(Admin::ImportParticipatoryTextForm).from_params(params) Admin::ImportParticipatoryText.call(@import) do on(:ok) do flash[:notice] = I18n.t("participatory_texts.import.success", scope: "decidim.proposals.admin") - redirect_to participatory_texts_path(component_id: current_component.id, initiative_slug: "asdf") + redirect_to EngineRouter.admin_proxy(current_component).participatory_texts_path end on(:invalid) do flash.now[:alert] = I18n.t("participatory_texts.import.invalid", scope: "decidim.proposals.admin") render action: "new_import" @@ -47,11 +47,11 @@ if params.has_key?("save_draft") UpdateParticipatoryText.call(@preview_form) do on(:ok) do flash[:notice] = I18n.t("participatory_texts.update.success", scope: "decidim.proposals.admin") - redirect_to participatory_texts_path(component_id: current_component.id, initiative_slug: "asdf") + redirect_to EngineRouter.admin_proxy(current_component).participatory_texts_path end on(:invalid) do |failures| alert_msg = [I18n.t("participatory_texts.publish.invalid", scope: "decidim.proposals.admin")] failures.each_pair { |id, msg| alert_msg << "ID:[#{id}] #{msg}" } @@ -83,10 +83,10 @@ enforce_permission_to :manage, :participatory_texts DiscardParticipatoryText.call(current_component) do on(:ok) do flash[:notice] = I18n.t("participatory_texts.discard.success", scope: "decidim.proposals.admin") - redirect_to participatory_texts_path(component_id: current_component.id, initiative_slug: "asdf") + redirect_to EngineRouter.admin_proxy(current_component).participatory_texts_path end end end end end