comments order

This commit is contained in:
Nicolas Bally 2012-07-22 18:49:54 +02:00
parent eae5a3fd79
commit 0f54f71446
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class Article < ActiveRecord::Base
end
scope :recents, where("enabled = ?",true ).order("published_at ASC")
scope :recents, where("enabled = ?",true ).order("published_at DESC")
scope :between, lambda { |start, stop|
after(start).before(stop)

View File

@ -8,7 +8,7 @@ class Comment < ActiveRecord::Base
validates :pseudo, :presence => true
validates :comment, :presence => true
scope :recents, where("enabled = ?",true ).order("created_at DESC")
scope :recents, where("enabled = ?",true ).order("created_at ASC")