Remade with nested attributes

This commit is contained in:
2026-04-20 00:35:51 +03:00
parent 4040fff780
commit 4fedafd654
2 changed files with 15 additions and 35 deletions
+1
View File
@@ -5,6 +5,7 @@ class Workflow < ApplicationRecord
has_many :tasks, dependent: :restrict_with_exception
has_many :task_statuses, dependent: :restrict_with_error
accepts_nested_attributes_for :task_statuses, allow_destroy: true
enum :icon, { task: 'task', warning: 'warning' }, default: 'task', scopes: false
enum :color, { blue: 'blue', gray: 'gray', lime: 'lime', red: 'red', teal: 'teal' }, default: 'gray', scopes: false