-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
This is a regression in 3.0.
~~~ruby
class Customer
include Mongoid::Document
belongs_to :company
end
class Company
include Mongoid::Document
has_many :customers
end
company = Company.create!
customer = Customer.new
company.customers = [customer]
customer.persisted? # => true
~~~
Note that: company.customers.build.persisted? # => false