comment updates

This commit is contained in:
Mark Moser
2017-02-13 18:08:51 -06:00
parent 39ba1a8369
commit 906b62247b
6 changed files with 110 additions and 11 deletions

View File

@ -4,4 +4,8 @@ class QuizComment < ApplicationRecord
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