Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Display posts in rev chron order

  • Loading branch information...
commit cb8cfb1721995519aacfabca342e23c2f38c976b 1 parent 24c3e3d
@dce authored
Showing with 3 additions and 1 deletion.
  1. +1 −1  app/models/comment.rb
  2. +2 −0  app/models/post.rb
View
2  app/models/comment.rb
@@ -3,5 +3,5 @@ class Comment < ActiveRecord::Base
validates_presence_of :name, :email, :comment
- default_scope :order => "created_at DESC"
+ default_scope :order => "created_at ASC"
end
View
2  app/models/post.rb
@@ -4,4 +4,6 @@ class Post < ActiveRecord::Base
validates_presence_of :title
scope :published, :conditions => { :published => true }
+
+ default_scope :order => "created_at DESC"
end
Please sign in to comment.
Something went wrong with that request. Please try again.