Files
fizzy/app/models/collection/cards.rb
T
David Heinemeier Hansson 966aa51a37 Get rid of unnecessary touch jobs
touch_all on 10K cards took 6ms in testing
2025-11-02 14:15:53 +01:00

10 lines
199 B
Ruby

module Collection::Cards
extend ActiveSupport::Concern
included do
has_many :cards, dependent: :destroy
after_update_commit -> { cards.touch_all }, if: :saved_change_to_name?
end
end