Prevent table columns' width change on form toggle

This commit is contained in:
2026-11-05 18:00:34 +01:00
parent 4940e6de86
commit 3655a74b94
23 changed files with 150 additions and 90 deletions
+2
View File
@@ -23,6 +23,8 @@ class Quantity < ApplicationRecord
# characters); this doesn't seem to apply to :string (implemented as varchar)
validates :description, length: {maximum: type_for_attribute(:description).limit}
# TODO: initialize `depth` to `parent.depth + 1`
# Update :depths of progenies after parent change
before_save if: :parent_changed? do
self[:depth] = parent&.depth&.succ || 0