Don't want to balloon txn, but also don't want to end up with a state with broken data

This commit is contained in:
David Heinemeier Hansson
2025-11-02 15:46:05 +01:00
parent 2c9845eb62
commit f09183bc9a
+1 -1
View File
@@ -12,7 +12,7 @@ class Collection < ApplicationRecord
scope :alphabetically, -> { order("lower(name)") }
scope :ordered_by_recently_accessed, -> { merge(Access.ordered_by_recently_accessed) }
after_destroy_commit :ensure_default_collection
after_destroy :ensure_default_collection
private
def ensure_default_collection