Commit f459e45458972d122cbef42e69cda3dc09f44c4b
Committed by
Antonio Terceiro
1 parent
e44d147e
Exists in
master
and in
29 other branches
ActionItem1035: order article comments by date
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/article.rb
@@ -11,7 +11,7 @@ class Article < ActiveRecord::Base | @@ -11,7 +11,7 @@ class Article < ActiveRecord::Base | ||
11 | 11 | ||
12 | belongs_to :last_changed_by, :class_name => 'Person', :foreign_key => 'last_changed_by_id' | 12 | belongs_to :last_changed_by, :class_name => 'Person', :foreign_key => 'last_changed_by_id' |
13 | 13 | ||
14 | - has_many :comments, :dependent => :destroy | 14 | + has_many :comments, :dependent => :destroy, :order => 'created_at asc' |
15 | 15 | ||
16 | has_many :article_categorizations, :conditions => [ 'articles_categories.virtual = ?', false ] | 16 | has_many :article_categorizations, :conditions => [ 'articles_categories.virtual = ?', false ] |
17 | has_many :categories, :through => :article_categorizations | 17 | has_many :categories, :through => :article_categorizations |