
* Previously, some models had "duplicated" `belongs_to` associations, which were now removed (and replaced by the `include Creation`).
11 lines
232 B
Ruby
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
|