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

Added a tip about routes and container parameters #6506

Closed
wants to merge 2 commits into from

Conversation

javiereguiluz
Copy link
Member

This replaces #6505.

@xabbuh
Copy link
Member

xabbuh commented Apr 21, 2016

👍

The route requirements can also include container parameters, as explained
in :doc:`this article </cookbook/routing/service_container_parameters>`.
This comes in handy when the regular expression is very complex and used
time and again in your application.
Copy link
Member

Choose a reason for hiding this comment

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

"is very complex and used time and again [...]"? I don't really understand what you're trying to tell with that bit.

Copy link
Member Author

Choose a reason for hiding this comment

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

"time and again" is an idiom for "repeatedly". In the example of the UUID, the problem is that the regexp is horrible. But in other cases the regexp is simple ... but used in 100 different routes ... so it's convenient to turn it into a parameter. Should I reword this?

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the info. I've learned a new idiom now.

@wouterj
Copy link
Member

wouterj commented May 5, 2016

Thank you Javier.

wouterj added a commit that referenced this pull request May 5, 2016
…eguiluz)

This PR was squashed before being merged into the 2.3 branch (closes #6506).

Discussion
----------

Added a tip about routes and container parameters

This replaces #6505.

Commits
-------

ae0f2c9 Added a tip about routes and container parameters
@wouterj wouterj closed this May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants