riak-ripple / ripple

A rich Ruby modeling layer for Riak, Basho's distributed database
Other
619 stars 152 forks source link

Saving a parent precludes modifying an association #297

Open martinstreicher opened 12 years ago

martinstreicher commented 12 years ago

If I change line 12 in associations_spec.rb to

@post        = Post.create(:title => "Hello, world!")

(that is, from .new to .create), the code in line 18...

@post.comments << @comment_one << @comment_two

... fails. If, however, I change line 12 to:

@post        = Post.create(:title => "Hello, world!", :comments => [])

... then all is well.

This makes coding a little mind-bending.