-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add note about upgrading custom routes from put
to patch
.
#10747
Conversation
Hm I'm afraid this wasn't intentional, it should be accepting both |
Yeah, this feels like an accident. |
Aha! I suspect this was introduced somewhere in between 4.0.0.beta1 and 4.0.0.rc1. At least that's when we noticed it in Basecamp. |
I'm digging into this a bit more... I don't think it was caused by the 4.0.0.beta1 -> 4.0.0.rc1 upgrade, I think we just didn't notice the bug right away. I think the change came from this commit: b7a0945 /cc @fxn I made a test app here to isolate the commit: https://github.com/trevorturk/rails-issue-patch According to this blog post we want to continue supporting PUT routes: http://weblog.rubyonrails.org/2012/2/25/edge-rails-patch-is-the-new-primary-http-method-for-updates/ Perhaps this should be added to the Rails 4.0.0 milestone? It's a potential blocker for release. Perhaps it's worth considering making this a breaking change in the upgrade from 3.x? I'll dig some more to see if I can fix the issue, but I'm not 100% sure how to proceed. If we see a PUT route with no conflicting PATCH route, should we make one? (I haven't thought through all of the potential areas of conflict yet.) |
Another option would be to undo some of b7a0945. We could set |
If we decide to leave things as-is, another possible note for the upgrade guide would be suggesting an alternative workaround. You can force
|
We've gone with PATCH, so I think we should stick to it and document the issue. Applying this. Please add further doc changes if necessary to make this clear. |
Add note about upgrading custom routes from `put` to `patch`.
I assume this is expected behavior and not a bug?