diff options
author | Nermin Vehabovic <nermin.vehabovic90@gmail.com> | 2019-02-16 16:11:31 +0100 |
---|---|---|
committer | Nermin Vehabovic <nermin.vehabovic90@gmail.com> | 2019-02-16 16:11:31 +0100 |
commit | eccfab4445e89dbd3c9b9c756d3daab10eef320f (patch) | |
tree | f2090c626571261440819322753d05d7f97a1cd1 /lib/api/helpers.rb | |
parent | 44b2d759b276c565cfb5c2c6461ba11965dd0a17 (diff) | |
download | gitlab-ce-eccfab4445e89dbd3c9b9c756d3daab10eef320f.tar.gz |
Added: Specs for sort page breaks on notes
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 4656b27c5d1..54cd4cd9cdb 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -299,6 +299,12 @@ module API items.search(text) end + def order_options_with_tie_breaker + order_options = { params[:order_by] => params[:sort] } + order_options['id'] ||= 'desc' + order_options + end + # error helpers def forbidden!(reason = nil) @@ -397,12 +403,6 @@ module API end # rubocop: enable CodeReuse/ActiveRecord - def order_options_with_tie_breaker - order_options = { params[:order_by] => params[:sort] } - order_options['id'] ||= 'desc' - order_options - end - def project_finder_params finder_params = { without_deleted: true } finder_params[:owned] = true if params[:owned].present? |