From 93831ac04e4e44f60397572dd0172c456781de30 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 17 Jul 2026 18:02:29 +0200 Subject: Fix computed_unique_name code and consumer --- app/models/node.rb | 2 +- app/views/nodes/new.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/node.rb b/app/models/node.rb index 717f5b4..4f585e1 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -269,7 +269,7 @@ class Node < ApplicationRecord end def computed_unique_name - path = path_to_root[1..-1].join("/") # excluding root + path_to_root[1..-1].join("/") # excluding root end def current_unique_name diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 38eac84..890d46e 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb @@ -33,7 +33,7 @@
Parent
<%= text_field_tag :parent_search_term, @parent&.title %> - <%= hidden_field_tag :parent_id, @parent&.id, data: { unique_name: @parent&.current_unique_name } %> + <%= hidden_field_tag :parent_id, @parent&.id, data: { unique_name: @parent&.computed_unique_name } %>
-- cgit v1.3