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