]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/issue_comment.rb
Use reports_count so that counter_cache works automatically.
[rails.git] / app / models / issue_comment.rb
index 455fb040bc73c7c102de27697fac01cb119b6a3b..2122a64892cbf8585e1dd9c967be1628b0fe938c 100644 (file)
@@ -1,6 +1,6 @@
 class IssueComment < ActiveRecord::Base
-       belongs_to :issue
-       belongs_to :user
+  belongs_to :issue
+  belongs_to :user, :class_name => "User", :foreign_key => :commenter_user_id
 
-       validates :body, :presence => true
+  validates :body, :presence => true
 end