This PR allows has_one and has_many associations to use a different serializer than the association name, if a string is passed in for the serializer.
Using a real world example - If you have this defined: has_one :current_driver, serializer: "User" in a Vehicle, the serializer resolver will always look for CurrentDriverSerializer, which is not the correct serializer, because we wanted a UserSerializer.
This PR allows has_one and has_many associations to use a different serializer than the association name, if a string is passed in for the serializer.
Using a real world example - If you have this defined:
has_one :current_driver, serializer: "User"
in a Vehicle, the serializer resolver will always look forCurrentDriverSerializer
, which is not the correct serializer, because we wanted aUserSerializer
.