From: Phrogz Date: 2007-11-07T13:55:02+09:00 Subject: Re: Is there a "||" that treats "" also as false? On Nov 6, 6:31 pm, Joshua Muheim wrote: > The problem is, in my Rails app I sometimes have a variable set to "" > (empty user input) or nil. This is why ActiveSupport has the #blank? method: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'active_support' => true irb(main):003:0> nil.blank? => true irb(main):004:0> "".blank? => true irb(main):005:0> "foo".blank? => false irb(main):006:0> false.blank? => true irb(main):007:0> 0.blank? => false