diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 03:58:14 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 03:58:14 +0200 |
| commit | 49a80c2f48531edc2a2719d77d3c5a8c111289dd (patch) | |
| tree | c09f4451049479b41c47221953ff4b62da3501f7 /app/controllers | |
| parent | 52cd07b6ff191efd25938b173b7eb14411fec3e4 (diff) | |
Convert the log's node zoom to participants, completing subtree histories
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/node_actions_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/node_actions_controller.rb b/app/controllers/node_actions_controller.rb index 6e467197..9b97b450 100644 --- a/app/controllers/node_actions_controller.rb +++ b/app/controllers/node_actions_controller.rb | |||
| @@ -6,7 +6,11 @@ class NodeActionsController < ApplicationController | |||
| 6 | 6 | ||
| 7 | def index | 7 | def index |
| 8 | @actions = NodeAction.order(:occurred_at => :desc, :id => :desc) | 8 | @actions = NodeAction.order(:occurred_at => :desc, :id => :desc) |
| 9 | @actions = @actions.where(:node_id => params[:node_id]) if params[:node_id].present? | 9 | if params[:node_id].present? |
| 10 | @actions = @actions.joins(:action_participants) | ||
| 11 | .where(:action_participants => { :subject_type => "Node", | ||
| 12 | :subject_id => params[:node_id] }) | ||
| 13 | end | ||
| 10 | @actions = @actions.where(:user_id => params[:user_id]) if params[:user_id].present? | 14 | @actions = @actions.where(:user_id => params[:user_id]) if params[:user_id].present? |
| 11 | @actions = @actions.includes(:node, :user) | 15 | @actions = @actions.includes(:node, :user) |
| 12 | .paginate(:page => params[:page], :per_page => 50) | 16 | .paginate(:page => params[:page], :per_page => 50) |
