Skip to content

Commit

Permalink
Folders are now sorted alphabetically in each category, addresses #11.
Browse files Browse the repository at this point in the history
  • Loading branch information
remomueller committed Sep 4, 2019
1 parent d9134d3 commit aac8bbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## 12.0.0

### Enhancements
- **Folder Changes**
- Folders are now sorted alphabetically in each category
- **Document Changes**
- Reduced size of folder names in documents sidebar
- Admins can now set keywords for documents to improve search results for
Expand Down
2 changes: 1 addition & 1 deletion app/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ class Category < ApplicationRecord
allow_nil: true

# Relationships
has_many :folders, -> { order(Arel.sql("folders.position nulls last")) }, dependent: :destroy
has_many :folders, -> { order(:name) }, dependent: :destroy
end

0 comments on commit aac8bbb

Please sign in to comment.