-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
The Mongoid::Attributes.attribute_present? method reads the attribute then returns value.blank? This is not a correct implementation for boolean values. The blank? method returns true if a boolean value is false. Thus, attribute_present? incorrectly returns false for boolean values that are present but false.
This implementation is a copy of the ActiveRecord.attribute_present? method, for which I have also submitted a bug here: