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
I am defining a route for a URL that looks like this: http://example.com/some_models/123.json
this.get('some_models/:id.json', function(request) { // ... });
The problem is that pretender is getting confused by the .json at the end. How can I define this route to be able to parse the :id?
.json
:id
The text was updated successfully, but these errors were encountered:
This is likely a question for the people at https://github.com/tildeio/route-recognizer: See tildeio/route-recognizer#126
Sorry, something went wrong.
Solution:
this.get('some_models/:id', function(request) { // Inspect the ID, match on `.json` for example, respond appropriately. });
Feedback: tildeio/route-recognizer#125 (comment)
/cc @amiel
No branches or pull requests
I am defining a route for a URL that looks like this: http://example.com/some_models/123.json
The problem is that pretender is getting confused by the
.json
at the end. How can I define this route to be able to parse the:id
?The text was updated successfully, but these errors were encountered: