12 lines
265 B
Ruby
12 lines
265 B
Ruby
# frozen_string_literal: true
|
|
class QuizComment < ApplicationRecord
|
|
belongs_to :user
|
|
belongs_to :candidate, foreign_key: :test_hash, primary_key: :test_hash
|
|
|
|
validates :message, presence: true
|
|
|
|
def edits?
|
|
updated_at > (created_at + 5.seconds)
|
|
end
|
|
end
|