Skip to content

Conversation

@valscion
Copy link
Member

@valscion valscion commented Jul 5, 2017

This PR picks off from #53 and adds authorization for the replacing of a polymorphic has-one relationship.

Seems like jsonapi-resources is broken and won't allow clearing of a polymorhpic has-one relationship by sending

PATCH /tags/1/relationships/taggable

{ "data": null }

The issue upstream is here: cerebris/jsonapi-resources#1081

I skipped the tests for the relationship nullification for now.

@valscion
Copy link
Member Author

valscion commented Jul 5, 2017

Ach this won't work if the associated polymorphic class changes. Or I'm not sure if it works... will ave to check that.

@valscion
Copy link
Member Author

valscion commented Jul 5, 2017

Ok I think that's it, now it should work even if the type of the associated object changes with the replace operation.

@valscion valscion merged commit 24bfed7 into master Aug 10, 2017
@valscion valscion deleted the polymorphic-replace branch August 10, 2017 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants