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
Global IDs can be URI-escaped and embedded in an app's routes and query params, but the percent escaping and needless detail makes a mess of the URL.
Let's provide a nice compact #to_param representation for these cases:
#to_param
Person.find(1).gid.to_param # => "Z2lkOi8vYXBwL1BlcnNvbi8x"
(That's just def to_param; Base64.strict_encode64 to_s end)
def to_param; Base64.strict_encode64 to_s end
The locator can try to Base64-decode non-URI arguments:
GlobalID::Locator.locate "Z2lkOi8vYXBwL1BlcnNvbi8x" # => Person id=1
The text was updated successfully, but these errors were encountered:
I added a pull request here #11
Sorry, something went wrong.
Implemented by @bencrouse 😁
No branches or pull requests
Global IDs can be URI-escaped and embedded in an app's routes and query params, but the percent escaping and needless detail makes a mess of the URL.
Let's provide a nice compact
#to_param
representation for these cases:(That's just
def to_param; Base64.strict_encode64 to_s end
)The locator can try to Base64-decode non-URI arguments:
The text was updated successfully, but these errors were encountered: