Skip to content
Snippets Groups Projects
Commit 389bd6b7 authored by Alex Braha Stoll's avatar Alex Braha Stoll
Browse files

Improve WikiPage.group_by_directory

parent d2b3fe45
No related branches found
No related tags found
1 merge request!8133Show directory hierarchy when listing wiki pages
Loading
Loading
@@ -23,7 +23,7 @@ class WikiPage
return [] if pages.blank?
 
pages.sort_by { |page| [page.directory, page.slug] }.
group_by { |page| page.directory }.
group_by(&:directory).
map do |dir, pages|
if dir.present?
WikiDirectory.new(dir, pages)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment