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
|
||||
|
||||
@@ -7,5 +7,5 @@ class Workflow < ApplicationRecord
|
||||
has_many :task_statuses, dependent: :restrict_with_error
|
||||
|
||||
enum :icon, { task: 'task', warning: 'warning' }, default: 'task', scopes: false
|
||||
enum :color, { blue: 'blue', gray: 'gray', yellow: 'yellow', red: 'red' }, default: 'gray', scopes: false
|
||||
enum :color, { blue: 'blue', gray: 'gray', lime: 'lime', red: 'red', teal: 'teal' }, default: 'gray', scopes: false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user