Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Call #to_s when serializing GlobalID. Fix #95 #96

Merged
merged 1 commit into from Jul 3, 2014

Conversation

miyagawa
Copy link
Contributor

@miyagawa miyagawa commented Jul 3, 2014

This is another approach to fix #95 by calling to_s when serializing ActiveModel::GlobalId object, so that there's no ambiguity about how to serialize GlobalId object regardless of the queue backend.

Thanks @zzak for the suggestion ❤️

@seuros
Copy link
Member

seuros commented Jul 3, 2014

@miyagawa thank you for your work. I think you should fix that in activemodel GlobalID instead.

@miyagawa
Copy link
Contributor Author

miyagawa commented Jul 3, 2014

@seuros you mean like this one? rails/activemodel-globalid#15

@zzak and I looked at the code and sure, we can fix it either way, but fixing it inside activejob leaves no ambiguity about serializing, since ActiveJob::Arguments is the code that decides how to persist the GlobalID objects.

@seuros
Copy link
Member

seuros commented Jul 3, 2014

yes. Leave both PR open.
@dhh , @guilleiguaran , @rafaelfranca are better suited to advice you which approach they think it best

dhh added a commit that referenced this pull request Jul 3, 2014
Call #to_s when serializing GlobalID. Fix #95
@dhh dhh merged commit 2c31b18 into rails:master Jul 3, 2014
@dhh
Copy link
Member

dhh commented Jul 3, 2014

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants