Hello, I have this problem: I need to save a relationship along with the record. For eg: If I have a comment with author, frontend sends this data:
{
"id": null,
"attributes": { "title": "Rails is Omakase" },
"relationships": {
"author": {
"data": {
"id": null,
"attributes": { "name": "New author" },
}
}
}
}
Now, i need to save comment in comments table, and also save author in authors table. does spec allows this? Im unable to find any such example in the specs. I googled, and found some custom solutions, but im not sure if its “logical” to save relationships like this.
Any inputs? Thanks in advance.