RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in