summaryrefslogtreecommitdiff
path: root/app/finders/milestones_finder.rb
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2018-02-05 15:16:41 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2018-02-05 15:16:41 -0600
commit46ae03628de47d1bef2683a3a5fe4963b3df7d52 (patch)
treeaca69b4acab10d5699a6315556de7e7530e65dbe /app/finders/milestones_finder.rb
parente6016d0bc2b640801914369e25e1a3639d3e50eb (diff)
parent2150ed4094ddb67d7b403cd56360700c80e7d928 (diff)
downloadgitlab-ce-46ae03628de47d1bef2683a3a5fe4963b3df7d52.tar.gz
Merge branch 'master' into jivl-update-katex
Diffstat (limited to 'app/finders/milestones_finder.rb')
-rw-r--r--app/finders/milestones_finder.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/finders/milestones_finder.rb b/app/finders/milestones_finder.rb
index 0a5a0ea2f35..b4605fca193 100644
--- a/app/finders/milestones_finder.rb
+++ b/app/finders/milestones_finder.rb
@@ -46,11 +46,7 @@ class MilestonesFinder
end
def order(items)
- if params.has_key?(:order)
- items.reorder(params[:order])
- else
- order_statement = Gitlab::Database.nulls_last_order('due_date', 'ASC')
- items.reorder(order_statement)
- end
+ order_statement = Gitlab::Database.nulls_last_order('due_date', 'ASC')
+ items.reorder(order_statement).order('title ASC')
end
end