]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_entry.rb
be a bit smarter about enlarging the bbox (note to self: must remember to put this...
[rails.git] / app / models / diary_entry.rb
index 8894f44355cddb66feb936e40a3eb61e85ef2668..dd1f9882a7a4726ffff14147292b1891a0584893 100644 (file)
@@ -1,5 +1,8 @@
 class DiaryEntry < ActiveRecord::Base
   belongs_to :user
 class DiaryEntry < ActiveRecord::Base
   belongs_to :user
+  has_many :diary_comments, :include => :user,
+                            :conditions => "users.visible = 1",
+                            :order => "diary_comments.id"
 
   validates_presence_of :title, :body
   validates_numericality_of :latitude, :allow_nil => true
 
   validates_presence_of :title, :body
   validates_numericality_of :latitude, :allow_nil => true