bug fixing using cursor

This commit is contained in:
Stefan Tollkühn
2025-09-10 13:45:29 +02:00
parent 06bea4cf46
commit 59e63cee2f
6 changed files with 15 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
class Project < ApplicationRecord
has_many :subprojects, inverse_of: :project
has_many :subprojects, inverse_of: :project, dependent: :destroy
accepts_nested_attributes_for :subprojects, allow_destroy: true, reject_if: :all_blank
validates :name, presence: true