Permalink
Browse files

Order search results comments by creation time

  • Loading branch information...
1 parent 3e25598 commit 452a53fcd7976e3538b0da82f550ef8bb9a7ad2b Alex Bredariol Grilo committed Oct 21, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/models/search_result.rb
View
1 app/models/search_result.rb
@@ -30,6 +30,7 @@ class SearchResult
has_one :answer, :dependent => :destroy
has_many :comments,
:foreign_key => 'commentable_id',
+ :order => 'created_at asc',
:dependent => :destroy
has_many :flags, :as => 'flaggeable', :dependent => :destroy
has_many :notifications, :as => 'reason', :dependent => :destroy

0 comments on commit 452a53f

Please sign in to comment.