unless keyword can be hard to read. It can set yourself up some weird double negative scenarios.
unless @user.name.blank? # do something end
if @user.name.present? # do something end
If you find yourself using a
bang! to negate a call with
.present? in it, just remove the
bang! and swap the methods.
In Rails there are the
.present? methods to determine if a value is nil, false, or an empty string. Same goes for enumerables like an array with the