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

Upgrade route-recognizer to decode dyanmic path segments #949

Merged
merged 1 commit into from
Dec 9, 2016

Conversation

mfazekas
Copy link
Contributor

@mfazekas mfazekas commented Nov 19, 2016

See tildeio/route-recognizer#91

Right now if id contains a special character like / or : then we need to use a workaround like:

this.get('/posts/:id', (request, schema) {
    let decodedId = decodeURIComponent(request.params.id);
    return schema.posts.find(decodedId);
});

@mfazekas
Copy link
Contributor Author

There might be a more appropriate location for the tests.

@samselikoff samselikoff merged commit af7e459 into miragejs:master Dec 9, 2016
@samselikoff
Copy link
Collaborator

Thank you! ✨

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