Commit b7ecf433 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add cr remarks

parent 0b324d34
...@@ -328,9 +328,9 @@ class ProjectsController < Projects::ApplicationController ...@@ -328,9 +328,9 @@ class ProjectsController < Projects::ApplicationController
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
def project_params(attributes: project_params_attributes) def project_params(attributes: [])
params.require(:project) params.require(:project)
.permit(attributes) .permit(project_params_attributes + attributes)
end end
def project_params_attributes def project_params_attributes
...@@ -375,7 +375,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -375,7 +375,7 @@ class ProjectsController < Projects::ApplicationController
end end
def project_params_create_attributes def project_params_create_attributes
project_params_attributes << :namespace_id [:namespace_id]
end end
def custom_import_params def custom_import_params
......
--- ---
title: Disallow updating namespace during updating project title: Disallow updating namespace when updating a project
merge_request: merge_request:
author: author:
type: security type: security
...@@ -383,7 +383,7 @@ describe ProjectsController do ...@@ -383,7 +383,7 @@ describe ProjectsController do
id: project.id, id: project.id,
project: params project: params
} }
end.not_to change {project.namespace} end.not_to change {project.reload.namespace}
end end
def update_project(**parameters) def update_project(**parameters)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment