在测试我的控制器(使用jsonapi-resources)时,我在更新时遇到了这个错误。
{\"errors\":[{\"title\":\"Key is not included in URL\",\"detail\":\"The URL does not support the key 946591862\",\"id\":null,\"href\":null,\"code\":\"110\",\"source\":null,\"links\":null,\"status\":\"400\",\"meta\":null}]} 发出请求的代码示例
process :update, method: :post, params: {
id: model_id,
data: update_attributes
}我只是在写基本的ActionController::TestCase测试。update_attributes方法遵循以下格式:
{
id: model_id,
attributes: attributes,
type: model_type
}发布于 2016-05-21 00:41:25
阿。我遇到的问题是,我在数据散列内部和外部使用了不同的I。
https://stackoverflow.com/questions/37351410
复制相似问题