Rails 7 adds Enumerable#sole
Rails 7 series | Rails 7.0 adds Enumerable#sole