From 31639eab59e9029328251eb1c4d6ddb5bd1db88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 23 May 2016 18:45:09 -0300 Subject: Remove deprecated `xml_http_request` and `xhr` methods --- actionpack/lib/action_controller/test_case.rb | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index f4ec13c831..051cb40381 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -422,21 +422,6 @@ module ActionController process_with_kwargs("HEAD", action, *args) end - def xml_http_request(*args) - ActiveSupport::Deprecation.warn(<<-MSG.strip_heredoc) - xhr and xml_http_request methods are deprecated in favor of - `get :index, xhr: true` and `post :create, xhr: true` - MSG - - @request.env["HTTP_X_REQUESTED_WITH"] = "XMLHttpRequest" - @request.env["HTTP_ACCEPT"] ||= [Mime[:js], Mime[:html], Mime[:xml], "text/xml", "*/*"].join(", ") - __send__(*args).tap do - @request.env.delete "HTTP_X_REQUESTED_WITH" - @request.env.delete "HTTP_ACCEPT" - end - end - alias xhr :xml_http_request - # Simulate an HTTP request to +action+ by specifying request method, # parameters and set/volley the response. # -- cgit v1.2.3