This is simpler, and still runs inside the same transaction (#destroy uses a transaction internally). Also, use Dataset#destroy instead of all.each(&:destroy).
9.6 KiB
9.6 KiB