should sort by Page#depth so slug parts are in the right order
This commit is contained in:
parent
ff901ca3d3
commit
acd731347c
@ -69,7 +69,7 @@ class Page
|
|||||||
if self.index? || self.not_found?
|
if self.index? || self.not_found?
|
||||||
self.slug
|
self.slug
|
||||||
else
|
else
|
||||||
slugs = self.self_and_ancestors.map(&:slug)
|
slugs = self.self_and_ancestors.sort_by(&:depth).map(&:slug)
|
||||||
slugs.shift unless slugs.size == 1
|
slugs.shift unless slugs.size == 1
|
||||||
File.join slugs
|
File.join slugs
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user