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

Fixed routing method example #5615

Closed
wants to merge 1 commit into from
Closed

Fixed routing method example #5615

wants to merge 1 commit into from

Conversation

carletex
Copy link

Q A
Doc fix? yes
New docs? no
Applies to all

@OskarStark
Copy link
Contributor

looks ok to me

@carletex
Copy link
Author

Hey @OskarStark,

sorry for not explaining properly. Above the code block, you can read:

Suppose you have a contact form with two controllers - one for displaying the form (on a GET request) and one for processing the form when it's submitted (on a POST request). This can be accomplished with the following route configuration:

and below:

Despite the fact that these two routes have identical paths (/contact), the first route will match only GET requests and the second route will match only POST requests. This means that you can display the form and submit the form via the same URL, while using distinct controllers for the two actions.

In the current code, there is only one controller for the /contact route which accept the GET and POST method. I tried to fix the code using two diferent controllers associated with the same route, but with diferent methods, like the text says.

Thanks.

@wouterj
Copy link
Member

wouterj commented Aug 12, 2015

The example was changed, as it was recommending not-so-good practices. Instead of fixing the code example, the text should be fixed.

However, maybe we should remove this completely, see #5583 for some background

So for the current state, my vote is 👎 (which, btw, doesn't mean I don't like your contribution!)

@carletex
Copy link
Author

Thank you @wouterj,

I should have searched for open issues before creating this pull request. I'm closing the PR and I will be following this in the thread you mentioned.

@carletex carletex closed this Aug 16, 2015
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.

3 participants