]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/issue_comment.rb
Ensure that issue comments have associated issues and users.
[rails.git] / app / models / issue_comment.rb
index 2122a64892cbf8585e1dd9c967be1628b0fe938c..bbc6261640ab48d635d9256a87d754b24e0c31ed 100644 (file)
@@ -3,4 +3,6 @@ class IssueComment < ActiveRecord::Base
   belongs_to :user, :class_name => "User", :foreign_key => :commenter_user_id
 
   validates :body, :presence => true
   belongs_to :user, :class_name => "User", :foreign_key => :commenter_user_id
 
   validates :body, :presence => true
+  validates :user, :presence => true
+  validates :issue, :presence => true
 end
 end