summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-18 11:15:27 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-18 11:15:27 -0700
commitb5e961eb4c8ccc022d49af76d563a8a97ad5eb34 (patch)
tree15f979ecc5793e52b7d5d1d0f7d74e0234ce0cd9
parentb5b2055ccaf574ac330d93900673896a44f48cc5 (diff)
parent5994b036d26dca8b44504b0813ee8a11373aefae (diff)
downloadgitlab-ce-b5e961eb4c8ccc022d49af76d563a8a97ad5eb34.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
-rw-r--r--app/models/note.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 649e9b4e852..bbbe71173a9 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -44,6 +44,7 @@ class Note < ActiveRecord::Base
mount_uploader :attachment, AttachmentUploader
# Scopes
+ default_scope { order(created_at: :asc, id: :asc) }
scope :for_commit_id, ->(commit_id) { where(noteable_type: "Commit", commit_id: commit_id) }
scope :inline, ->{ where("line_code IS NOT NULL") }
scope :not_inline, ->{ where(line_code: [nil, '']) }