Create a ressource with multiple relationships
The docs specifiy how to create a post -> comments relationship (so in the same direction as the
has_many
relationship
But I couldn't find how to create a ressource that has multiple belongs_to
With the post -> comments example,
How would you create a comment that has more that one required relationship?
Example:
comment_created_by -> User
comment_post -> Post
comment_category (?) -> CommentCategorySolution:Jump to solution
And write the ids. Or you can use the
argument
+ manage_relationship
pattern which you can see in the relationships guide3 Replies
There are two ways
You can make their ids writable
Solution
And write the ids. Or you can use the
argument
+ manage_relationship
pattern which you can see in the relationships guideThanks Zach !