]> git.openstreetmap.org Git - rails.git/commitdiff
Order issue comments by id
authorAnton Khorev <tony29@yandex.ru>
Tue, 8 Apr 2025 10:02:52 +0000 (13:02 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 8 Apr 2025 10:02:52 +0000 (13:02 +0300)
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] }