@@ -10,21 +10,21 @@ def file_params
1010
1111 def test_params
1212 [ :id , :title , :testing_framework_id , :description , :internal_description , :test_type , :xml_id , :validity , :timeout , :_destroy ,
13- :parent_id , { files_attributes : file_params } ]
13+ :parent_id , { files_attributes : [ file_params ] } ]
1414 end
1515
1616 def model_solution_params
17- [ :id , :description , :internal_description , :xml_id , :_destroy , :parent_id , { files_attributes : file_params } ]
17+ [ :id , :description , :internal_description , :xml_id , :_destroy , :parent_id , { files_attributes : [ file_params ] } ]
1818 end
1919
2020 def task_params
21- params . require ( : task) . permit ( :title , :description , :internal_description , :parent_uuid , :language , :license_id ,
22- :programming_language_id , :access_level , files_attributes : file_params , tests_attributes : test_params ,
23- model_solutions_attributes : model_solution_params , label_names : [ ] ) . tap { |parameters | fix_nested_files_params ( parameters ) }
21+ params . expect ( task : [ :title , :description , :internal_description , :parent_uuid , :language , :license_id ,
22+ :programming_language_id , :access_level , { files_attributes : [ file_params ] , tests_attributes : [ test_params ] ,
23+ model_solutions_attributes : [ model_solution_params ] , label_names : [ ] } ] ) . tap { |parameters | fix_nested_files_params ( parameters ) }
2424 end
2525
2626 def group_tasks_params
27- params . require ( : group_tasks) . permit ( group_ids : [ ] )
27+ params . expect ( group_tasks : [ group_ids : [ ] ] )
2828 end
2929
3030 def import_confirm_params
0 commit comments