search for: boolean_attribut

Displaying 1 result from an estimated 1 matches for "boolean_attribut".

Did you mean: boolean_attribute
2006 Jul 27
0
Why is false.blank? => true ?
When using a boolean attribute, often you want to insure that it has a value that is either false or true, but not null. One would think that "validates_presence_of :boolean_attribute" would work for such a purpose, but it does not, because false.blank? => true. I''m guessing this is the expected behavior, but I''m wondering about the rationale. blank? would imply the lack of data (empty sets, nils), but false is a value with a particular meaning, so ha...