From d6c88736bd19b233b39ac38df5ae7df733ca92cf Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 2 Nov 2025 14:19:26 +0100 Subject: [PATCH] No need for validation when we have rely on update!/create! on db constraints --- app/models/column.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/column.rb b/app/models/column.rb index d0c1ce102..10ab6f3df 100644 --- a/app/models/column.rb +++ b/app/models/column.rb @@ -4,9 +4,6 @@ class Column < ApplicationRecord belongs_to :collection, touch: true has_many :cards, dependent: :nullify - validates :name, presence: true - validates :color, presence: true - before_validation :set_default_color after_save_commit -> { cards.touch_all }, if: -> { saved_change_to_name? || saved_change_to_color? } after_destroy_commit -> { collection.cards.touch_all }