app/controllers/decidim/accountability/admin/import_results_controller.rb in decidim-accountability-0.24.3 vs app/controllers/decidim/accountability/admin/import_results_controller.rb in decidim-accountability-0.25.0.rc1
- old
+ new
@@ -11,23 +11,13 @@
def create
@csv_file = params[:csv_file]
redirect_to(new_import_path) && return if @csv_file.blank?
- Decidim::Accountability::Admin::ImportResultsCSVJob.perform_later(current_user, current_component, @csv_file.read.force_encoding("utf-8").encode("utf-8"))
+ Decidim::Accountability::Admin::ImportResultsCsvJob.perform_later(current_user, current_component, @csv_file.read.force_encoding("utf-8").encode("utf-8"))
flash[:notice] = I18n.t("imports.create.success", scope: "decidim.accountability.admin")
- redirect_to import_results_path(current_participatory_process, current_component)
- end
-
- private
-
- def current_component
- @current_component ||= current_participatory_process.components.find(params[:component_id])
- end
-
- def current_participatory_process
- @current_participatory_process ||= ParticipatoryProcess.find_by(slug: params[:participatory_process_slug])
+ redirect_to import_results_path(current_participatory_space, current_component)
end
end
end
end
end