Both raise an exception unless a single record is found.
Of course this would not make a difference when working with mongoid... I also like the fail fast approach.
https://blog.saeloun.com/2021/03/16/rails-adds-sole-and-find...
Both raise an exception unless a single record is found.
Of course this would not make a difference when working with mongoid... I also like the fail fast approach.
https://blog.saeloun.com/2021/03/16/rails-adds-sole-and-find...