diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-06 21:08:44 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-06 21:08:44 +0300 |
commit | dd8dd92e501b7e980e913e7fa3a3efa5824d21fe (patch) | |
tree | 9494c3abe46aff03ad657f7f32ca147845d25232 /app/finders | |
parent | 6b61c9049815cdcc2b22a572441adba0e3dc230d (diff) | |
parent | ce0811ae5cf2c69ccf24e101b1ec1554a42e9856 (diff) |
Merge branch 'api-default-order' into 'master'
Sorting refactoring
* refactor sorting logic for web UI
* refactor and document ordering for API: project, issues, merge requests
* explicitly define ordering in models using default_scope
See merge request !1476
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/notes_finder.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb index 6fe15b41060..e2bd0a2560e 100644 --- a/app/finders/notes_finder.rb +++ b/app/finders/notes_finder.rb @@ -22,6 +22,7 @@ class NotesFinder end # Use overlapping intervals to avoid worrying about race conditions - notes.where('updated_at > ?', last_fetched_at - FETCH_OVERLAP) + notes.where('updated_at > ?', last_fetched_at - FETCH_OVERLAP). + order(created_at: :asc, id: :asc) end end |