-
Notifications
You must be signed in to change notification settings - Fork 121
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
Deprecate gid
/sgid
/global_id
/signed_global_id
#36
Conversation
Use `to_gid`/`to_sgid`/`to_global_id`/`to_signed_global_id` instead.
Do we need to deprecate? I mean, we are in beta... |
I wanted to reward the earlier adopters by making their life's easier, but like I said this is more code than I expected, so I am indifferent 😄 |
IMO no need to deprecate. Let's just go straight to the new method names.
|
👍 feel free to pick this up, I won't be able to resubmit this today — On Tue, Aug 26, 2014 at 11:05 AM, David Heinemeier Hansson
|
I like that A Global ID is a unique identifier for a record, not a serialization of the record itself. We get a reference to a record, serialize it in Active Job params, then deserialize Active Job params and dereference the Global ID to retrieve the record. Some options:
|
I don’t know. It seems pretty similar to stuff like #to_param as well. The GlobalID is not an inherent attribute of the object, like #id or #class. It’s a conversion. Similar to #to_json as well. I think there’s enough precedence there for it to be a good fit. Not liking any of the other options doesn’t help either. On Aug 27, 2014, at 6:41 AM, Jeremy Kemper notifications@github.com wrote:
|
Fixed in 8f893e1 |
Did a quick spike to see how we can gracefully handle the rename, but it took more code than I thought, so I am not sure if it's worth the effort. However I suppose we will cut a 1.0 release to go out with 4.2.0.final, so not like this code is staying for a long time anyway.
Feel free to reject this and just rename it if you don't think it's worth the trouble. This is still < 1.0 so I suppose it's fair game either way.
Closes #34