Check polymorphic type in validations
* Previously, some models had "duplicated" `belongs_to` associations, which were now removed (and replaced by the `include Creation`).
This commit is contained in:

committed by
Sebastian Serth

parent
be4f2b790d
commit
977fa4539e
@@ -2,9 +2,9 @@
|
||||
|
||||
# TODO: reference to lti_param_model
|
||||
class RemoteEvaluationMapping < ApplicationRecord
|
||||
include Creation
|
||||
before_create :generate_token, unless: :validation_token?
|
||||
belongs_to :exercise
|
||||
belongs_to :user, polymorphic: true
|
||||
belongs_to :study_group, optional: true
|
||||
|
||||
def generate_token
|
||||
|
Reference in New Issue
Block a user