Returns the HTTP request method as a lowercase symbol (:get, for example). Note, HEAD is returned as :get since the two are supposedly to be functionaly equivilent for all purposes except that HEAD won’t return a response body (which Rails also takes care of elsewhere).
# File actionpack/lib/action_controller/request.rb, line 19 def method @request_method ||= (!parameters[:_method].blank? && @env['REQUEST_METHOD'] == 'POST') ? parameters[:_method].to_s.downcase.to_sym : @env['REQUEST_METHOD'].downcase.to_sym @request_method == :head ? :get : @request_method end