skill-assessment-app/app/models/quiz_comment.rb

12 lines
265 B
Ruby
Raw Permalink Normal View History

2017-02-10 12:03:50 -06:00
# 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
2017-02-13 18:08:51 -06:00
def edits?
updated_at > (created_at + 5.seconds)
end
2017-02-10 12:03:50 -06:00
end