[Ruby on Rails] Use blank? or present? instead of nil? to check model attributes
The title says it all, but Rails has convenient methods like blank? and present?, so let’s make good use of them.
・nil?またはempty?を判定するblank? - ザリガニが見ていた…。
・Railsエンジニアならこれだけは知っておけっていう便利メソッド - (゚∀゚)o彡 sasata299’s blog
That’s all from the Gemba.