提交 f1d1f01b 编写于 作者: K Kent Sibilev

Removed deprecated @request and @response usages.



git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 3010e30f
*SVN*
* Removed deprecated @request and @response usages. [Kent Sibilev]
* Removed invocation of deprecated before_action and around_action filter methods. Corresponding before_invocation and after_invocation methods should be used instead. #6275 [Kent Sibilev]
* Provide access to the underlying SOAP driver. #6212 [bmilekic, Kent Sibilev]
......
......@@ -39,7 +39,7 @@ module ClassMethods
# can then be used as the entry point for invoking API methods from a web browser.
def web_service_scaffold(action_name)
add_template_helper(Helpers)
module_eval <<-"end_eval", __FILE__, __LINE__
module_eval <<-"end_eval", __FILE__, __LINE__ + 1
def #{action_name}
if request.method == :get
setup_invocation_assigns
......@@ -76,12 +76,12 @@ def #{action_name}_submit
@method_request_xml = @protocol.encode_request(method_name, params, @scaffold_method.expects)
new_request = @protocol.encode_action_pack_request(@scaffold_service.name, @scaffold_method.public_name, @method_request_xml)
prepare_request(new_request, @scaffold_service.name, @scaffold_method.public_name)
@request = new_request
self.request = new_request
if @scaffold_container.dispatching_mode != :direct
request.parameters['action'] = @scaffold_service.name
end
dispatch_web_service_request
@method_response_xml = @response.body
@method_response_xml = response.body
method_name, obj = @protocol.decode_response(@method_response_xml)
return if handle_invocation_exception(obj)
@method_return_value = @scaffold_method.cast_returns(obj)
......@@ -127,7 +127,7 @@ def scaffold_path(template_name)
def reset_invocation_response
erase_render_results
@response.headers = ::ActionController::AbstractResponse::DEFAULT_HEADERS.merge("cookie" => [])
response.headers = ::ActionController::AbstractResponse::DEFAULT_HEADERS.merge("cookie" => [])
end
def public_method_name(service_name, method_name)
......
......@@ -161,7 +161,7 @@ def alwaysFail
class AbstractController < ActionController::Base
def generate_wsdl
@request ||= ::ActionController::TestRequest.new
self.request ||= ::ActionController::TestRequest.new
to_wsdl
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册