skill-assessment-app/app/models/quiz_comment.rb
2017-02-13 18:08:51 -06:00

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