Enable exercise forms to manipulate file creation flag

This commit is contained in:
Maximilian Grundke
2016-05-10 17:14:07 +02:00
parent 6c820b75c7
commit aba6d56a87
5 changed files with 8 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class ExercisesController < ApplicationController
private :user_by_code_harbor_token
def exercise_params
params[:exercise].permit(:description, :execution_environment_id, :file_id, :instructions, :public, :hide_file_tree, :team_id, :title, files_attributes: file_attributes).merge(user_id: current_user.id, user_type: current_user.class.name)
params[:exercise].permit(:description, :execution_environment_id, :file_id, :instructions, :public, :hide_file_tree, :allow_file_creation, :team_id, :title, files_attributes: file_attributes).merge(user_id: current_user.id, user_type: current_user.class.name)
end
private :exercise_params