-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key attribute being ignored on associations in 0.9.0 #670
Comments
@shedd I was able to dig this out of the compare between 0.8 and 0.9: https://github.com/rails-api/active_model_serializers/compare/0-8-stable...0-9-stable?diff=unified#diff-04c6e90faac2675aa89e2176d2eec7d8R436 I tested using the root attribute instead of key and it works for me. Is there anywhere in the current docs where it says to still use key? If so, it should be updated. If not, I think this could be added. @steveklabnik Is root going to be a permanent replacement for the key attribute? |
@Retistic thanks! changing For 0.10.x, how should we be thinking about these changes, given this statement in the README: "0.10.x will be based on the 0.8.0 code" How many of the 0.9.x changes will be adopted for 0.10.x? Regarding the docs, I still see
|
+1 same issue here. Should root be used instead of key? Comment from authors? |
0.10 is going to follow 0.8, not 0.9, so I would expect this to be fixed there. 0.9 is sorta its own thing, a dead end. |
In version 0.8.x we were using the
key
attribute for has_one relationships like the following:This seems to have broken in 0.9.0.
The record comes through with the key
user
rather thanuser_assigned
I've downgraded back to 0.8.2 and this works as expected again.
The text was updated successfully, but these errors were encountered: