diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-16 01:40:37 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-16 01:40:37 +0200 |
| commit | fb7b8233f1bbf7acb88d48f96e6f81cefe168d1c (patch) | |
| tree | ea534f143235be295b55b8732b2b7d9111a380f9 /app/controllers/nodes_controller.rb | |
| parent | 467ec340be673fbc7c3140b86d8aa7e43307ad1d (diff) | |
Provide parent_unique_name in nodes#new if parent is already pre-set
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 9c5d228..ed5f8ef 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -29,7 +29,9 @@ class NodesController < ApplicationController | |||
| 29 | @selected_kind = CccConventions::NODE_KINDS.key?(params[:kind]) ? params[:kind] : "generic" | 29 | @selected_kind = CccConventions::NODE_KINDS.key?(params[:kind]) ? params[:kind] : "generic" |
| 30 | if params.has_key?(:parent_id) | 30 | if params.has_key?(:parent_id) |
| 31 | @parent_id = params[:parent_id] | 31 | @parent_id = params[:parent_id] |
| 32 | @parent_name = Node.find(@parent_id).title | 32 | parent = Node.find(@parent_id) |
| 33 | @parent_name = parent.title | ||
| 34 | @parent_unique_name = parent.current_unique_name | ||
| 33 | end | 35 | end |
| 34 | end | 36 | end |
| 35 | 37 | ||
