app/controllers/decidim/admin/participatory_processes_controller.rb in decidim-admin-0.0.3 vs app/controllers/decidim/admin/participatory_processes_controller.rb in decidim-admin-0.0.5

- old
+ new

@@ -22,13 +22,13 @@ def create authorize! :new, Decidim::ParticipatoryProcess @form = form(ParticipatoryProcessForm).from_params(params) CreateParticipatoryProcess.call(@form) do - on(:ok) do + on(:ok) do |participatory_process| flash[:notice] = I18n.t("participatory_processes.create.success", scope: "decidim.admin") - redirect_to participatory_processes_path + redirect_to participatory_process_path(participatory_process) end on(:invalid) do flash.now[:alert] = I18n.t("participatory_processes.create.error", scope: "decidim.admin") render :new @@ -46,12 +46,12 @@ @participatory_process = collection.find(params[:id]) authorize! :update, @participatory_process @form = form(ParticipatoryProcessForm).from_params(params) UpdateParticipatoryProcess.call(@participatory_process, @form) do - on(:ok) do + on(:ok) do |participatory_process| flash[:notice] = I18n.t("participatory_processes.update.success", scope: "decidim.admin") - redirect_to participatory_processes_path + redirect_to participatory_process_path(participatory_process) end on(:invalid) do flash.now[:alert] = I18n.t("participatory_processes.update.error", scope: "decidim.admin") render :edit