Does it make sense to use cocoon solely for a has_one relationship?

I’ve been trying to get cocoon working with a form that handles a has_one relationship but no has_many relationships, and come across a few gotchas, such as Cocoon and has_one association .

I’m starting to wonder if I’m taking the wrong approach by using cocoon in this scenario. One reason is that the documentation about cocoon talks about has_many relationships, but not has_one ones. Maybe it’s because the only benefits for cocoon is when there’s a has_many relationship and you want to dynamically create related objects.

Is cocoon supposed to make relationships easier in a way that’s useful for has_one relationships?

Source: forms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.