diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-05-28 22:28:21 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-05-28 22:28:21 -0300 |
commit | 3a8656bfd13bdb68797a89f6dfe409044f8c245a (patch) | |
tree | 619987cf0ee0626b0af14971ef41579b684ce73e /actionpack/lib/action_dispatch | |
parent | b8b7c2f52f1cc3fcf59fa95bbf7b7786ea2231a1 (diff) | |
parent | 9a16a29f40b27fb58f95510e79bda9746081c0fc (diff) | |
download | rails-3a8656bfd13bdb68797a89f6dfe409044f8c245a.tar.gz rails-3a8656bfd13bdb68797a89f6dfe409044f8c245a.tar.bz2 rails-3a8656bfd13bdb68797a89f6dfe409044f8c245a.zip |
Merge pull request #20341 from vngrs/remove_already_defined_methods_in_rack_request
Remove already defined methods in super class of ActionDispatch::Request class
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index f3de19db0b..fe83c01562 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -141,42 +141,6 @@ module ActionDispatch HTTP_METHOD_LOOKUP[method] end - # Is this a GET (or HEAD) request? - # Equivalent to <tt>request.request_method_symbol == :get</tt>. - def get? - HTTP_METHOD_LOOKUP[request_method] == :get - end - - # Is this a POST request? - # Equivalent to <tt>request.request_method_symbol == :post</tt>. - def post? - HTTP_METHOD_LOOKUP[request_method] == :post - end - - # Is this a PATCH request? - # Equivalent to <tt>request.request_method == :patch</tt>. - def patch? - HTTP_METHOD_LOOKUP[request_method] == :patch - end - - # Is this a PUT request? - # Equivalent to <tt>request.request_method_symbol == :put</tt>. - def put? - HTTP_METHOD_LOOKUP[request_method] == :put - end - - # Is this a DELETE request? - # Equivalent to <tt>request.request_method_symbol == :delete</tt>. - def delete? - HTTP_METHOD_LOOKUP[request_method] == :delete - end - - # Is this a HEAD request? - # Equivalent to <tt>request.request_method_symbol == :head</tt>. - def head? - HTTP_METHOD_LOOKUP[request_method] == :head - end - # Provides access to the request's HTTP headers, for example: # # request.headers["Content-Type"] # => "text/plain" |