-
Type: Task
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
Using Mongoid 3.1.4
Receive "NoMethodError: undefined method `errors' for nil:NilClass" when calling Model.create!(attributes)
It's coming from line 277 in persistence.rb:
fail_validate!(doc) unless doc.insert.errors.empty?
So presumably doc.insert is nil. How could that be possible? Seems like a mongoid bug.