PagePath
Stable, translatable URLs for pages. Trek keeps every path a page has ever had, so old URLs keep working (redirecting to the current one) after a page is renamed or moved.
Columns
| Column | Type | Notes |
|---|---|---|
page_id | bigint | required |
path | jsonb | translated full path (e.g. services/design) |
Behavior
belongs_to :page— all historical paths of the pagehas_one :current_page— the page this path is the current path for (viapages.current_path_id)- Includes Translatable — paths are localized per locale
- Records are created and updated automatically by the page's
after_save_commitcallback; you never manage them by hand
See Pathable for the page-side API (full_path, find_at_full_path…).