From 6db49cfe5d4c9cb5d0c3722d8b464b9dfd2f5d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 17 Dec 2018 18:45:29 +0100 Subject: [PATCH] Make Projects::ImportsController EE-compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/controllers/projects/imports_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/projects/imports_controller.rb b/app/controllers/projects/imports_controller.rb index a10e159ea1e..8b33fa85c1e 100644 --- a/app/controllers/projects/imports_controller.rb +++ b/app/controllers/projects/imports_controller.rb @@ -13,7 +13,7 @@ class Projects::ImportsController < Projects::ApplicationController end def create - if @project.update(safe_import_params) + if @project.update(import_params) @project.import_state.reload.schedule end @@ -66,11 +66,11 @@ class Projects::ImportsController < Projects::ApplicationController end end - def import_params - params.require(:project).permit(:import_url) + def import_params_attributes + [:import_url] end - def safe_import_params - import_params + def import_params + params.require(:project).permit(import_params_attributes) end end