spec/fixtures/reply.rb in will_paginate-3.0.pre2 vs spec/fixtures/reply.rb in will_paginate-3.0.pre4
- old
+ new
@@ -1,7 +1,9 @@
class Reply < ActiveRecord::Base
belongs_to :topic, :include => [:replies]
- scope :recent, :conditions => ['replies.created_at > ?', 15.minutes.ago]
-
+ scope :recent,
+ :conditions => ['replies.created_at > ?', 15.minutes.ago],
+ :order => 'replies.created_at DESC'
+
validates_presence_of :content
end