diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-10 14:38:29 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-10 15:34:36 +0300 |
commit | 8d19f4b4a610d4c26c685c5069b91c6636590c76 (patch) | |
tree | b0256eab186c65f9c8b68c2b166acdfe4500f747 /app/finders/labels_finder.rb | |
parent | a5517ada119a0e73e0a70fd18e11fda3932138e8 (diff) |
Add sort dropdown to project labels page and group labels page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/finders/labels_finder.rb')
-rw-r--r-- | app/finders/labels_finder.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb index 1d05bf28438..8418577dab2 100644 --- a/app/finders/labels_finder.rb +++ b/app/finders/labels_finder.rb @@ -54,7 +54,11 @@ class LabelsFinder < UnionFinder end def sort(items) - items.reorder(title: :asc) + if params[:sort] + items.order_by(params[:sort]) + else + items.reorder(title: :asc) + end end def with_title(items) |