]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/issue.rb
Order issue comments by id
[rails.git] / app / models / issue.rb
index 970426715183fab78bfafceca4cfbfcf063c8bfb..d628f7ae8e47ec9d130b89d8117ce38b63bde86e 100644 (file)
@@ -37,7 +37,7 @@ class Issue < ApplicationRecord
   belongs_to :user_updated, :class_name => "User", :foreign_key => :updated_by, :optional => true
 
   has_many :reports, -> { order(:id) }, :dependent => :destroy
-  has_many :comments, :class_name => "IssueComment", :dependent => :destroy
+  has_many :comments, -> { order(:id) }, :class_name => "IssueComment", :dependent => :destroy
 
   validates :reportable_id, :uniqueness => { :scope => [:reportable_type] }