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
A couple of years and a major version of Rails later, there doesn't seem to be any progress on this issue.
This did the job for me at the top of routes.rb
:
Rails.application.routes.draw do
def put(*) end
...
Because the set_member_mappings_for_resource
method mentioned in the OP's answer calls put
, this simply makes it a no-op.
If you do need put
routes, you could put them above this line. If you wanted to be fancy, you could define a without_verbs(*verbs, &block)
method that temporarily replaces the various verb methods, yields, and then puts them back.