Files
codeocean/app/models/event.rb
Sebastian Serth 977fa4539e Check polymorphic type in validations
* Previously, some models had "duplicated" `belongs_to` associations, which were now removed (and replaced by the `include Creation`).
2023-08-24 19:32:06 +02:00

11 lines
232 B
Ruby

# frozen_string_literal: true
class Event < ApplicationRecord
include Creation
belongs_to :exercise
belongs_to :file, class_name: 'CodeOcean::File'
validates :category, presence: true
validates :data, presence: true
end