fc56ad9d7c
- Switch to binary 16 for UUID keys - Remove AccountScopedRecord base class, all model use binary uuids now - Fix the search sql to serialize uuids properly - Patch the MySQL schema dumper to output binary lengths
11 lines
354 B
Ruby
11 lines
354 B
Ruby
class Column < ApplicationRecord
|
|
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
|