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.

Theoretically Related Posts
  • Rails Ninjas We Are Not
  • Email is not a fat pipe. We forget this at our peril.
  • Testing in Rails: Way More Trouble Than Flossing
  • “Release It!” and corporate computing fun
  • Trackbacks

    Use this link to trackback from your own site.

    Comments

    Leave a response

    Comments