diff options
author | Samuel Bernard <s.bernard@criteo.com> | 2015-03-18 15:28:32 +0100 |
---|---|---|
committer | Samuel Bernard <s.bernard@criteo.com> | 2015-03-18 17:06:17 +0100 |
commit | 7602cef572fd770a06eb3d94f2aef57c2693dcb6 (patch) | |
tree | 77fd78d7c983cd13dfef1337928e4f0380af1555 /app/models/note.rb | |
parent | 1f21dfaeabe9e515b821139a22809fb03fccbcd9 (diff) | |
download | gitlab-ce-7602cef572fd770a06eb3d94f2aef57c2693dcb6.tar.gz |
Note: add default_scope { order(created_at: :asc, id: :asc) }
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 9ca3e4d7e97..2be06978d5f 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, '']) } |