her
her copied to clipboard
Feature request: PATCH support
I propose to add support for PATCH verb.
Generally speaking, REST conventions suppose two different types of request for different actions:
PUT /resources/:id {"a":"abc","b":"cde"}
to specify new value of all object properties. In such a case not mentioned properties can be treated as having default or NULL value
and
PATCH /resources/:id {"b":"cde"}
to specify only changed properties. In such a case not mentioned properties are treated as not changed
What do you think about such feature support?
:+1:
FWIW, I was able to call save on an existing resource and have it use the PATCH method with the following code in my model:
class User
include Her::Model
method_for :update, :patch
...
end