resolve/refinerycms — pull request #1584 by nicholassm (2012-04-10 10:37:19+00:00)
Title: Fixes page ambiguity for different pages with the same slug in find_by_path.

The first page found in `Refinery::Page.find_by_path` should be a root page.

The current version could return the wrong page in the following scenario:

/about # page 1
/team/about # page 2

The problem is that
`Refinery::Page.find_by_path("about")`
and
`Refinery::Page.find_by_path("team/about")`
could return page 2 in both cases depending on the ordering of the pages in the database.
This commit fixes this issue by requiring the first page found `by_slug` to be a root page.