Closed
Description
class Foo
belongs_to :bar
end
class Bar
has_one :foo
end
bar = Bar.new(foo: Foo.new)
bar.save
everything gets saved but in the return data the new instance of Foo will not be reported, and thus bar.foo will not have an id, and will look like its still "new". If you then bar.save
again, another copy of Foo gets created.