Rails 7 adds `Enumerable#sole` to return a sole item in the enumerable
In Rails 7, Enumerable#sole returns the sole item in the enumerable and raises an exception if no items or more than one item is found.
Read more -> https://blog.saeloun.com/2021/05/26/rails-7-adds-enumerable-sole
Post a comment