Exercise view: Re-use @execution_environments

This commit is contained in:
Sebastian Serth
2021-11-08 22:29:18 +01:00
parent 1dce6c59ab
commit e224e41564

View File

@ -4,7 +4,7 @@ h1 = Exercise.model_name.human(count: 2)
.row.px-3
.form-group
= f.label(:execution_environment_id_eq, t('activerecord.attributes.exercise.execution_environment'), class: 'sr-only')
= f.collection_select(:execution_environment_id_eq, ExecutionEnvironment.with_exercises, :id, :name, class: 'form-control', prompt: t('activerecord.attributes.exercise.execution_environment'))
= f.collection_select(:execution_environment_id_eq, @execution_environments.with_exercises, :id, :name, class: 'form-control', prompt: t('activerecord.attributes.exercise.execution_environment'))
.form-group
= f.label(:title_cont, t('activerecord.attributes.exercise.title'), class: 'sr-only')
= f.search_field(:title_cont, class: 'form-control', placeholder: t('activerecord.attributes.exercise.title'))