-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Hi, I noticed an unexpected behavior with a localized boolean field.
A quick example:
class Person
include Mongoid::Document
field :active, type: Boolean, localize: true, default: false
end
me = Person.new
me.active?
- returns true instead of false
This happens here: https://github.com/mongoid/mongoid/blob/master/lib/mongoid/fields.rb#L453
I will try to send a PR but not sure I'll have time in the next weeks for that.
Best,
Did