Changed workflows rendering again

This commit is contained in:
2026-03-24 00:28:14 +02:00
parent 1c1d11cbe6
commit 83b296dbe7
13 changed files with 67 additions and 59 deletions
-9
View File
@@ -8,15 +8,6 @@ class TaskStatus < ApplicationRecord
validates :name, presence: true, uniqueness: { scope: :workflow }
validates :category, presence: true
validate :associations_should_have_same_project
scope :default_order, -> { order(:category, :name) }
private
def associations_should_have_same_project
return if workflow.project == project
errors.add(:workflow, "Doesn't belong in the same project")
end
end