]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_entry.rb
Resyncing from head 10895:11795
[rails.git] / app / models / diary_entry.rb
index fe48ee8dce01b50213dd72c05878f2e78c60c67c..c20788fbbe7858b6056d5773ae2183a5941b0d2e 100644 (file)
@@ -1,6 +1,8 @@
 class DiaryEntry < ActiveRecord::Base
   belongs_to :user
-  has_many :diary_comments, :order => "id"
+  has_many :diary_comments, :include => :user,
+                            :conditions => "users.visible = 1",
+                            :order => "diary_comments.id"
 
   validates_presence_of :title, :body
   validates_length_of :title, :within => 1..255