Skip to content
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

#to_global_id should accept params #75

Merged
merged 1 commit into from
Jun 16, 2015
Merged

#to_global_id should accept params #75

merged 1 commit into from
Jun 16, 2015

Conversation

rzane
Copy link

@rzane rzane commented Jun 2, 2015

Since URI::GID.create allows params, it seems like #to_global_id would accept a params hash. This would be convenient for non-standard cases like multiple databases.

@kaspth
Copy link
Contributor

kaspth commented Jun 2, 2015

This should be a simple change. Would you like to submit a pull request? 😄

@rzane
Copy link
Author

rzane commented Jun 2, 2015

Sure, no problem.

@rzane
Copy link
Author

rzane commented Jun 9, 2015

@kaspth Look good?

@@ -11,7 +11,9 @@ class << self

def create(model, options = {})
if app = options.fetch(:app) { GlobalID.app }
new URI::GID.create(app, model), options
params = options.except(:app, :verifier, :for)
params = nil if params.empty? # Prevent trailing ? mark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled in URI::GID.

@kaspth
Copy link
Contributor

kaspth commented Jun 15, 2015

Mostly, but can you squash your commits? 😄

@rzane
Copy link
Author

rzane commented Jun 15, 2015

Squashed

kaspth added a commit that referenced this pull request Jun 16, 2015
#to_global_id should accept params
@kaspth kaspth merged commit 4df66fb into rails:master Jun 16, 2015
@kaspth
Copy link
Contributor

kaspth commented Jun 16, 2015

Thanks! ❤️

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

Successfully merging this pull request may close these issues.

2 participants