diff options
author | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-05-28 20:59:21 +0300 |
---|---|---|
committer | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-05-28 20:59:21 +0300 |
commit | 9a16a29f40b27fb58f95510e79bda9746081c0fc (patch) | |
tree | b4b998b51e2f7e98d437355473baa293b3a6b8b8 /actionpack/lib/action_dispatch/http | |
parent | 7cc9754209c0ae00d70bdd629fa4a81a1c74cc6f (diff) | |
download | rails-9a16a29f40b27fb58f95510e79bda9746081c0fc.tar.gz rails-9a16a29f40b27fb58f95510e79bda9746081c0fc.tar.bz2 rails-9a16a29f40b27fb58f95510e79bda9746081c0fc.zip |
Remove already defined methods in super class of ActionDispatch::Request class
These methods had defined in 2004 by dhh in initial commit and `ActionDispatch::Request`
class has been inherited from `Rack::Request` class in 2009 by josh.
In 2014 these methods and more of them defined in `Rack::Request` class
so we don't need them anymore in rails codebase.
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-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" |