Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add note about upgrading custom routes from `put` to `patch`.

  • Loading branch information...
commit 03dbd8af56c8c45f8b39aa6e081656bd13c06c4a 1 parent 432ffdb
@javan javan authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 guides/source/
18 guides/source/
@@ -41,6 +41,24 @@ So, in Rails 4 both `PUT` and `PATCH` are routed to update. We recommend
switching to `PATCH` as part of your upgrade process if possible, as it's more
likely what you want.
+Note, when using `form_for` to update a resource in conjunction with a custom route,
+you'll need to update your route to explicity match the `patch` verb:
+<%= form_for [ :update_name, @user ] do |f| %>
+ ...
+<% end %>
+resources :users do
+ # Rails 3
+ put :update_name, on: :member
+ # Rails 4
+ patch :update_name, on: :member
For more on PATCH and why this change was made, see [this post](
on the Rails blog.

0 comments on commit 03dbd8a

Please sign in to comment.
Something went wrong with that request. Please try again.