Ensure that issue comments have associated issues and users.

This commit is contained in:
Andy Allan 2017-09-13 15:01:36 +01:00
parent a0b665faf7
commit 33c43ab0af
3 changed files with 8 additions and 6 deletions

View file

@ -3,4 +3,6 @@ class IssueComment < ActiveRecord::Base
belongs_to :user, :class_name => "User", :foreign_key => :commenter_user_id
validates :body, :presence => true
validates :user, :presence => true
validates :issue, :presence => true
end