As you know, the line in routes.rb - resources :articles - will give out routes like:
GET / articles / articles # index articles_path GET / articles / new / articles # new new_article_path POST / articles / articles # create articles_path GET / articles /: id / articles # show article_path (: id) GET / articles /: id / edit / articles # edit edit_article_path (: id) PATCH / PUT / articles /: id / articles # update article_path (: id) DELETE / articles /: id / articles # destroy article_path (: id)
- Is it possible in the rails to replace the PATCH method ONLY with the put or post method? Maybe somehow disable globally or switch work with this method?
- If it is possible to change the stupid route, then how can I change the string
resources :articles?
updatefrom ActiveRecord follows the more semantics ofPATCH, but if you use it with all (known) fields, you will get almostPUT. Pretty funny situation. - D-side