Sort /pages alphabetically

Previously, the 'All Pages' view was not sorted alphabetically. We need
to sort on the lowercase version of the page names so that lowercase
names do not end up at the bottom of the list and are instead mixed in
alphabetically, as they should be.

Patches test/test_latest_changes_view.rb to include changes needed to
test alphabetical sorting.
This commit is contained in:
Nathan Lowe
2015-01-10 12:15:06 -05:00
parent a7dc8d8c6f
commit a650c0eab8
10 changed files with 11 additions and 3 deletions
+1
View File
@@ -450,6 +450,7 @@ module Precious
wiki = Gollum::Wiki.new(settings.gollum_path, wiki_options)
@results = wiki.pages
@results += wiki.files if settings.wiki_options[:show_all]
@results = @results.sort_by { |p| p.name.downcase } # Sort Results alphabetically, fixes 922
@ref = wiki.ref
mustache :pages
end