Update schema to reflect re-usable error_template_attributes, descriptions, hints, and sorting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
class ErrorTemplate < ActiveRecord::Base
|
||||
belongs_to :execution_environment
|
||||
has_and_belongs_to_many :error_template_attributes
|
||||
end
|
||||
|
@@ -1,3 +1,3 @@
|
||||
class ErrorTemplateAttribute < ActiveRecord::Base
|
||||
belongs_to :error_template
|
||||
has_and_belongs_to_many :error_template
|
||||
end
|
||||
|
@@ -11,6 +11,7 @@ class ExecutionEnvironment < ActiveRecord::Base
|
||||
has_many :exercises
|
||||
belongs_to :file_type
|
||||
has_many :hints
|
||||
has_many :error_templates
|
||||
|
||||
scope :with_exercises, -> { where('id IN (SELECT execution_environment_id FROM exercises)') }
|
||||
|
||||
|
Reference in New Issue
Block a user