When NullObject Meets ActiveRecord
Here’s a gem called SafeFinder. It helps you building model’s Null Object, and whenever your finder methods get nothing, it returns your Null Object instead of nil or raises exception.
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!
Here’s a gem called SafeFinder. It helps you building model’s Null Object, and whenever your finder methods get nothing, it returns your Null Object instead of nil or raises exception.
Post a comment