An object is blank if it's nil, empty, or a whitespace string. If it's nil, it's nil.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Defining #blank for Array. | 20 | 199 | July 10, 2012 | |
x.nil? or x.blank? | 4 | 147 | December 7, 2007 | |
empty? vs. blank? vs. length > 0 | 9 | 132 | August 21, 2007 | |
validates_... :if option: only validate when not empty? | 2 | 127 | October 17, 2007 | |
testing for nil or empty and then... | 1 | 108 | October 13, 2006 |