Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Change route fallback action to PATCH instead of POST #223

Closed
asm89 opened this Issue · 3 comments

3 participants

Alexander Yaroslav Kiliba Konstantin Kudryashov
Alexander
Owner

The route loader will generate a route with the action 'POST' for each action that is not a predefined one. The docs state the following about this:

All actions that do not match the ones listed in the sections above will register as a POST action.
...
This allows for easy updating of aspects of a resource, without having to deal with the resource as a whole at the standard POST endpoint.

Following the reasoning of allowing for easier updating aspects of a resource, the fallback action should rather be PATCH instead?

ping @everzet If you agree I'll send a PR updating the route loader, tests and documentation.

Konstantin Kudryashov everzet was assigned
Yaroslav Kiliba

And an interesting article about PATCH - Edge Rails: PATCH is the new primary HTTP method for updates - http://weblog.rubyonrails.org/2012/2/25/edge-rails-patch-is-the-new-primary-http-method-for-updates/

Konstantin Kudryashov
Owner

ok

Alexander
Owner

:thumbsup: I'll send a PR.

Alexander asm89 referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Alexander asm89 referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Alexander asm89 closed this in b48f159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.