You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MultiWord's relationship on my backend is obviously declared with snake case (belongs_to :multi_word) since I'm using Rails.
If I try to create or update a Thing with its nested MultiWord, JSON:API will expect the corresponding key in the relationships hash to be kebab-case, but ActiveResourceJS automatically converts it to snake_case when making the request:
Which results in a 400 response, with an error code "105: Param multi_word is not allowed".
Bypassing ActiveResourceJS for these requests and putting in relationships: { multi-word: {...} } makes everything work...
I've tried other formats for declaring the relationship, none of which seem to work:
classThingextendsresourceLibrary.Base{this.belongsTo('multi_word')}// doesn't workclassThingextendsresourceLibrary.Base{this.belongsTo('multi-word')}// can't even assign the association anymore
The text was updated successfully, but these errors were encountered:
I have the following relationship:
MultiWord
's relationship on my backend is obviously declared with snake case (belongs_to :multi_word
) since I'm using Rails.If I try to create or update a Thing with its nested MultiWord, JSON:API will expect the corresponding key in the
relationships
hash to be kebab-case, but ActiveResourceJS automatically converts it to snake_case when making the request:Which results in a 400 response, with an error code "105: Param multi_word is not allowed".
Bypassing ActiveResourceJS for these requests and putting in
relationships: { multi-word: {...} }
makes everything work...I've tried other formats for declaring the relationship, none of which seem to work:
The text was updated successfully, but these errors were encountered: