summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-06 19:40:48 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-06 19:40:48 +0200
commit527376039c527eb8f559c5e6da76429bc3f3ee4f (patch)
tree283f9b5950cd1c7840c5c48cb8d604cb9cd32dc2 /db/migrate
parent3dbf522783dfce496884e05559dc962cae4b1e1b (diff)
Add tree-position scoping to Page.aggregateerdgeist-revive-events
New :children option ("direct" or "all") on the [aggregate] shortcode, composable with the existing :tags filter - both apply as independent successive .where clauses, ANDing together automatically, no special casing needed. content_helper.rb passes the current @page.node through as :node whenever :children is requested, since Page.aggregate has no way to resolve "which node" from the shortcode's bare option strings on its own. Guarded so nothing changes for any existing [aggregate] shortcode that never uses children= - :node stays nil, the new branch never fires. "all" resolves via node.descendants.pluck(:id) rather than embedding the descendants relation directly as a subquery. Not proven strictly necessary - extensive debugging this session initially pointed at a subquery/table-alias collision, but every actual failure traced instead to accumulated test-node debris left in the dev DB by earlier interrupted runs, confirmed by re-running against a cleaned database. Kept anyway as a one-round-trip-cheaper, more defensive default regardless.
Diffstat (limited to 'db/migrate')
0 files changed, 0 insertions, 0 deletions