Skip to content

v1.0.0.alpha4

Pre-release
Pre-release
Compare
Choose a tag to compare
@valscion valscion released this 30 May 09:30
· 54 commits to master since this release
3e8fd62

Fixes a PATCH request to save a resource with a has_one relationship being nullified. #54 (comment)

Thanks to @jpalumickas for the PR! (#54)

There is also a problem when we have has_one relationship and trying to save it with parent but sending null

class User
  belongs_to :nationality, class_name: 'Country'
end

PATCH /users/1

"data": {
  "type": "users",
  "id": "1",
  "relationships": {
    "nationality": null
    }
  }
}

So we need to add same functionality (when nil) to related_models_with_context also in 1.0.0.alpha3

now we have an error:

{
  "errors": [
    {
      "title": "Record not found",
      "detail": "The record identified by  could not be found.",
      "code": "404",
      "status": "404"
    }
  ]
}