empty?とblank?は使う機会が多いのですがなにが違うのか
.empty?
文字の長さが0のときtrue
.blank?
文字の長さが0かnilのときtrue
.empty?の場合nilだったときは普通にエラーがでます
You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.empty?
後empty?はRuby、blank?はRailsのメソッドであるためRubyの参考書にblank?はなかったりします
最後についている?は真偽値を返すメソッドです