From 9a16a29f40b27fb58f95510e79bda9746081c0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Emin=20=C4=B0NA=C3=87?= Date: Thu, 28 May 2015 20:59:21 +0300 Subject: 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. --- actionpack/lib/action_dispatch/http/request.rb | 36 -------------------------- 1 file changed, 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 request.request_method_symbol == :get. - def get? - HTTP_METHOD_LOOKUP[request_method] == :get - end - - # Is this a POST request? - # Equivalent to request.request_method_symbol == :post. - def post? - HTTP_METHOD_LOOKUP[request_method] == :post - end - - # Is this a PATCH request? - # Equivalent to request.request_method == :patch. - def patch? - HTTP_METHOD_LOOKUP[request_method] == :patch - end - - # Is this a PUT request? - # Equivalent to request.request_method_symbol == :put. - def put? - HTTP_METHOD_LOOKUP[request_method] == :put - end - - # Is this a DELETE request? - # Equivalent to request.request_method_symbol == :delete. - def delete? - HTTP_METHOD_LOOKUP[request_method] == :delete - end - - # Is this a HEAD request? - # Equivalent to request.request_method_symbol == :head. - 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" -- cgit v1.2.3