comments order
This commit is contained in:
parent
eae5a3fd79
commit
0f54f71446
@ -28,7 +28,7 @@ class Article < ActiveRecord::Base
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
scope :recents, where("enabled = ?",true ).order("published_at ASC")
|
scope :recents, where("enabled = ?",true ).order("published_at DESC")
|
||||||
|
|
||||||
scope :between, lambda { |start, stop|
|
scope :between, lambda { |start, stop|
|
||||||
after(start).before(stop)
|
after(start).before(stop)
|
||||||
|
@ -8,7 +8,7 @@ class Comment < ActiveRecord::Base
|
|||||||
validates :pseudo, :presence => true
|
validates :pseudo, :presence => true
|
||||||
validates :comment, :presence => true
|
validates :comment, :presence => true
|
||||||
|
|
||||||
scope :recents, where("enabled = ?",true ).order("created_at DESC")
|
scope :recents, where("enabled = ?",true ).order("created_at ASC")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user