Rails 4 has introduced PATCH
requests to be the default request method when doing the (common) partial updates on objects. This is conformal to HTTP standards and a
To answer my own question: no, it is currently not possible to disable the default generation of the PUT/PATCH combination in rails 4, which can be clearly seen when looking at the source of ActionDispatch::Routing at https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/mapper.rb and especially those lines:
def set_member_mappings_for_resource
member do
get :edit if parent_resource.actions.include?(:edit)
get :show if parent_resource.actions.include?(:show)
if parent_resource.actions.include?(:update)
patch :update
put :update
end
delete :destroy if parent_resource.actions.include?(:destroy)
end
end
Obviously, there is (currently) no conditional for excluding the PUT
route. I will prepare an issue or pull request for this and come back later with the result of that.
Until then, the best workaround would be what Jorge de los Santos has suggested, although this would pretty much pollute config/routes.rb
.