summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-19 16:05:40 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-19 16:05:40 +0200
commit4df88b601b1900c287051d827eaff46f498f60d0 (patch)
treeb6db47fbb256dc68601f2aa31430d8636018f115 /app/assets
parentedf0d64aa2c837b4bb28787483f98cb4815601c2 (diff)
Redirect a page to a node or an external URL
Page#redirect_target resolves the precedence and returns nil for a destination that is restricted or has no head, so a page with a broken target renders itself rather than linking nowhere. The banner partial will call the same method, so the redirect and the link cannot drift. One hop, no exceptions, checked in publish_draft! rather than as a validation: two nodes publishing concurrently could each pass a save-time check and still produce a chain. "Live" means heads only, a draft redirect that has not published is not yet a link anyone can follow. Node.search excludes redirecting pages. editor_search does not: an editor looking for one searches by title, and only the body is worth hiding.
Diffstat (limited to 'app/assets')
0 files changed, 0 insertions, 0 deletions