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

@ -6,6 +6,7 @@ class ExecutionEnvironment < ActiveRecord::Base
after_initialize :set_default_values
has_many :exercises
belongs_to :file_type
has_many :hints
scope :with_exercises, -> { where('id IN (SELECT execution_environment_id FROM exercises)') }