mongoid 4.0.2
I have Test
class:
class Test
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Paranoia
field :successful, type: Boolean, default: false
default_scope ->{ where(successful: true) }
end
Then I do:
t=Test.new; t.successful
=> true
So here is the question: what is the reason behind this behaviour?
P.S. I have fixed it resetting successful
with the help of after_initialize
method.