-
Type: Bug
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Associations
Given the following:
class Person
has_many :posts
embeds_many :addresses
end
The following is the current behavior:
person1 = Person.create! person1.posts.create! person1.posts.exists? #=> true OK person1.addresses.create! person1.addresses.exists? #=> true OK person1 = Person.create! person1.posts.build person1.posts.exists? #=> false OK person1.addresses.build person1.addresses.exists? #=> true BAD!
The last line should return false, because the address is not yet persisted in the database.