Disambiguate order clause.
authorTom Hughes <tom@compton.nu>
Sun, 12 Oct 2008 18:42:34 +0000 (18:42 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 12 Oct 2008 18:42:34 +0000 (18:42 +0000)
app/models/diary_entry.rb

index 8568160774f8d671dfefd8a8746a5eefbfdd3649..dd1f9882a7a4726ffff14147292b1891a0584893 100644 (file)
@@ -2,7 +2,7 @@ class DiaryEntry < ActiveRecord::Base
   belongs_to :user
   has_many :diary_comments, :include => :user,
                             :conditions => "users.visible = 1",
-                            :order => "id"
+                            :order => "diary_comments.id"
 
   validates_presence_of :title, :body
   validates_numericality_of :latitude, :allow_nil => true