Fun Facts about Rails: nil.blank?

Posted by amy on September 02, 2007

$ script/console
Loading development environment.
>> nil.blank?
=> true
>> ''.blank?
=> true
>> [].blank?
=> true

That’s useful, but I had either never read it, or had read it and forgotten it. Apparently I’m not the only one.

Popularity: 15% [?]