Make Projects::ImportsController EE-compatible

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2018-12-17 18:45:29 +01:00
parent 4a10c813e7
commit 6db49cfe5d
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
1 changed files with 5 additions and 5 deletions

View File

@ -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