We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version: 1.5
Without polymorphic association, I can do:
belongs_to( :event, id_method_name: :event_uuid, )
It correctly uses event_uuid as the method to get the id of the association.
event_uuid
With polymorphic though:
belongs_to( :resource, id_method_name: :resource_uuid, polymorphic: true )
id_method_name has no effect, it always uses resource_id as the id. I think this is a bug?
id_method_name
resource_id
The text was updated successfully, but these errors were encountered:
Can verify, also think this is a bug.
Sorry, something went wrong.
If this is a dealbreaker for someone I think you can work around it like this:
record_type: { Image: :image, etc }
ResourceSerializer
attributes :widht, :height, if: proc { |record, _params| record.class == Image }
I'm not sure how/if relationships would work in this case.
This is still a bug and makes the use of polymorphic serialization difficult.
Successfully merging a pull request may close this issue.
Version: 1.5
Without polymorphic association, I can do:
It correctly uses
event_uuid
as the method to get the id of the association.With polymorphic though:
id_method_name
has no effect, it always usesresource_id
as the id. I think this is a bug?The text was updated successfully, but these errors were encountered: