From e224e41564613241f2dbcd53970fccc6cfc54c2e Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Mon, 8 Nov 2021 22:29:18 +0100 Subject: [PATCH] Exercise view: Re-use @execution_environments --- app/views/exercises/index.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/exercises/index.html.slim b/app/views/exercises/index.html.slim index 46ba1d4b..8f6267a5 100644 --- a/app/views/exercises/index.html.slim +++ b/app/views/exercises/index.html.slim @@ -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'))