extended execution environments by a default file type that is used as the default for associated exercises' files

This commit is contained in:
Hauke Klement
2015-03-10 18:14:26 +01:00
parent 039c891364
commit 3ae749bfc5
12 changed files with 37 additions and 5 deletions

View File

@ -7,6 +7,6 @@
= f.select(:path, @paths, {}, class: 'form-control')
.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, {}, class: 'form-control')
= 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')
= f.hidden_field(:context_id)
.actions = render('shared/submit_button', f: f, object: CodeOcean::File.new)