Commit 389bd6b7 authored by Alex Braha Stoll's avatar Alex Braha Stoll

Improve WikiPage.group_by_directory

parent d2b3fe45
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment