---
url: /reference/concerns/pathable.md
---
# Trek::Pages::Pathable

Manages a page's URL paths across locales: the current path, the full history (for redirects), and automatic regeneration when pages move in the tree.

## What it adds

* `belongs_to :current_path` and `has_many :paths` → [PagePath](/reference/models/page-path)
* `after_save_commit`, paths are (re)created for the page **and all its descendants**

## Methods

| Method | Returns |
| --- | --- |
| `Page.find_at_full_path(path)` | the page at this path (raises `ActiveRecord::RecordNotFound`) |
| `full_path` | the current path string |
| `full_path_from_tree` | the path computed from ancestor slugs |

## Usage

```ruby
parent = Page.create(title: "Services")
child = Page.create(title: "Design", parent: parent)

child.full_path                          # => "services/design"
Page.find_at_full_path("services/design") # => child
```

Old paths remain in `page.paths`, which lets your front-end controllers redirect outdated URLs to `full_path`.
