TIL: use #presence instead of #blank? or #present? + conditional

I came across this today while coding. Super handy.

[https://apidock.com/rails/Object/presence](https://apidock.com/rails/Object/presence)

[Works with present? too, obviously](https://preview.redd.it/evoiufe9v1s81.png?width=1042&format=png&auto=webp&s=6c0b0afb6f9d031789cba9a5fff1b738614ee774)

2 thoughts on “TIL: use #presence instead of #blank? or #present? + conditional”

Leave a Comment