show comments ordered by created_at, they are showing up at random order without that
This commit is contained in:
parent
5b29c2700a
commit
182c6228f3
1 changed files with 1 additions and 1 deletions
|
|
@ -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!
|
||||
|
|
|
|||
Loading…
Reference in a new issue