Changed workflows rendering again
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user