lib/elasticsearch/api/actions/indices/delete_template.rb in elasticsearch-api-0.4.0 vs lib/elasticsearch/api/actions/indices/delete_template.rb in elasticsearch-api-0.4.1

- old
+ new

@@ -14,16 +14,15 @@ # # @see http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/ # def delete_template(arguments={}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + valid_params = [ :timeout ] + method = 'DELETE' - path = "_template/#{arguments[:name]}" - params = arguments.select do |k,v| - [ :timeout ].include?(k) - end - # Normalize Ruby 1.8 and Ruby 1.9 Hash#select behaviour - params = Hash[params] unless params.is_a?(Hash) + path = Utils.__pathify '_template', Utils.__escape(arguments[:name]) + + params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end end