summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-23 03:58:14 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-23 03:58:14 +0200
commit49a80c2f48531edc2a2719d77d3c5a8c111289dd (patch)
treec09f4451049479b41c47221953ff4b62da3501f7 /app/models
parent52cd07b6ff191efd25938b173b7eb14411fec3e4 (diff)
Convert the log's node zoom to participants, completing subtree histories
Diffstat (limited to 'app/models')
-rw-r--r--app/models/node.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/node.rb b/app/models/node.rb
index e92fa1ea..7a93e799 100644
--- a/app/models/node.rb
+++ b/app/models/node.rb
@@ -4,7 +4,14 @@ class Node < ApplicationRecord
4 4
5 # Associations 5 # Associations
6 has_many :pages, -> { order("revision ASC") }, :dependent => :destroy 6 has_many :pages, -> { order("revision ASC") }, :dependent => :destroy
7
8 # Entries where this node is the primary subject (fast-path column).
9 # For a *complete* history -- including subtree trash/destroy entries
10 # recorded at an ancestor -- use participated_actions instead.
7 has_many :node_actions, :dependent => :nullify 11 has_many :node_actions, :dependent => :nullify
12 has_many :action_participations, :class_name => "ActionParticipant", :as => :subject
13 has_many :participated_actions, :through => :action_participations, :source => :node_action
14
8 belongs_to :head, :class_name => "Page", :foreign_key => :head_id, optional: true 15 belongs_to :head, :class_name => "Page", :foreign_key => :head_id, optional: true
9 belongs_to :draft, :class_name => "Page", :foreign_key => :draft_id, optional: true 16 belongs_to :draft, :class_name => "Page", :foreign_key => :draft_id, optional: true
10 # Autosave pages carry no node_id, so has_many :pages does not cover 17 # Autosave pages carry no node_id, so has_many :pages does not cover