summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-12-17 18:45:29 +0100
committerRémy Coutable <remy@rymai.me>2018-12-17 18:48:59 +0100
commit6db49cfe5d4c9cb5d0c3722d8b464b9dfd2f5d04 (patch)
treebe9fc437675c002d1b33479206932b92880572ac
parent4a10c813e726d09216c534bb0ad0ae50a0400259 (diff)
downloadgitlab-ce-6db49cfe5d4c9cb5d0c3722d8b464b9dfd2f5d04.tar.gz
Make Projects::ImportsController EE-compatible
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--app/controllers/projects/imports_controller.rb10
1 files 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