request.method vs request.request_method

method(): return the original value of the envioment's REQUEST_METHOD

request_method(): return the overriden value by a middleware

# view
# via rails delete link
<%= link_to 'Delete', some_path(SOME_RESOURCE.id), method: :delete %>


# controller
request.method
#=> "POST"

request.request_method
#=> "DELETE"

Reference

results matching ""

    No results matching ""