Class: Refinery::Pages::Finder::FinderByScopedPath
- Inherits:
-
FinderByPath
- Object
- FinderByPath
- Refinery::Pages::Finder::FinderByScopedPath
- Defined in:
- pages/lib/refinery/pages/finder.rb
Instance Method Summary collapse
Methods inherited from FinderByPath
Constructor Details
This class inherits a constructor from Refinery::Pages::Finder::FinderByPath
Instance Method Details
#find ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'pages/lib/refinery/pages/finder.rb', line 117 def find # With slugs scoped to the parent page we need to find a page by its full path. # For example with about/example we would need to find 'about' and then its child # called 'example' otherwise it may clash with another page called /example. page = parent_page while page && path_segments.any? do page = next_page(page) end page end |