Use file template to generate new file content

This commit is contained in:
Maximilian Grundke
2016-06-10 13:41:38 +02:00
parent 1cd879bcb6
commit 4f8feb38e1
7 changed files with 16 additions and 2 deletions

View File

@ -8,5 +8,8 @@
.form-group
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'))
= f.collection_select(:file_type_id, FileType.where(binary: false).order(:name), :id, :name, {selected: @exercise.execution_environment.file_type.try(:id)}, class: 'form-control')
.form-group
= f.label(:file_template_id, t('activerecord.attributes.file.file_template_id'))
= f.collection_select(:file_template_id, FileTemplate.all.order(:name), :id, :name, {}, class: 'form-control')
= f.hidden_field(:context_id)
.actions = render('shared/submit_button', f: f, object: CodeOcean::File.new)