Files
fizzy/app/models/column.rb
T
Mike Dalessio e4011ef211 Update primary keys on customer data to UUIDs
- schema changes to primary and foreign keys
- fixture changes
- customer data models subclass AccountScopedRecord
- import script updated
2025-11-17 09:12:30 -05:00

11 lines
356 B
Ruby

class Column < AccountScopedRecord
include Colored, Positioned
belongs_to :account, default: -> { Current.account }
belongs_to :board, touch: true
has_many :cards, dependent: :nullify
after_save_commit -> { cards.touch_all }, if: -> { saved_change_to_name? || saved_change_to_color? }
after_destroy_commit -> { board.cards.touch_all }
end