Skip to content

Commit

Permalink
show comments ordered by created_at, they are showing up at random or…
Browse files Browse the repository at this point in the history
…der without that
  • Loading branch information
patcito authored and Maxwell Salzberg committed Sep 17, 2010
1 parent 5b29c27 commit 182c622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -18,7 +18,7 @@ class Post
key :person_id, ObjectId
key :user_refs, Integer, :default => 0

many :comments, :class_name => 'Comment', :foreign_key => :post_id
many :comments, :class_name => 'Comment', :foreign_key => :post_id, :order => 'created_at ASC'
belongs_to :person, :class_name => 'Person'

timestamps!
Expand Down

0 comments on commit 182c622

Please sign in to comment.