mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
group things that are alike
This commit is contained in:
parent
9f4dafb8ef
commit
4f2cd3e9fe
2 changed files with 10 additions and 10 deletions
|
@ -17,6 +17,9 @@ module ActionController
|
||||||
|
|
||||||
def recycle!
|
def recycle!
|
||||||
@_url_options = nil
|
@_url_options = nil
|
||||||
|
self.response_body = nil
|
||||||
|
self.formats = nil
|
||||||
|
self.params = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -467,11 +467,14 @@ module ActionController
|
||||||
# proper params, as is the case when engaging rack.
|
# proper params, as is the case when engaging rack.
|
||||||
parameters = paramify_values(parameters) if html_format?(parameters)
|
parameters = paramify_values(parameters) if html_format?(parameters)
|
||||||
|
|
||||||
|
unless @controller.respond_to?(:recycle!)
|
||||||
|
@controller.extend(Testing::Functional)
|
||||||
|
@controller.class.class_eval { include Testing }
|
||||||
|
end
|
||||||
|
|
||||||
@request.recycle!
|
@request.recycle!
|
||||||
@response.recycle!
|
@response.recycle!
|
||||||
@controller.response_body = nil
|
@controller.recycle!
|
||||||
@controller.formats = nil
|
|
||||||
@controller.params = nil
|
|
||||||
|
|
||||||
@html_document = nil
|
@html_document = nil
|
||||||
@request.env['REQUEST_METHOD'] = http_method
|
@request.env['REQUEST_METHOD'] = http_method
|
||||||
|
@ -492,12 +495,6 @@ module ActionController
|
||||||
|
|
||||||
build_request_uri(action, parameters)
|
build_request_uri(action, parameters)
|
||||||
|
|
||||||
unless @controller.respond_to?(:recycle!)
|
|
||||||
@controller.extend(Testing::Functional)
|
|
||||||
@controller.class.class_eval { include Testing }
|
|
||||||
end
|
|
||||||
|
|
||||||
@controller.recycle!
|
|
||||||
name = @request.parameters[:action]
|
name = @request.parameters[:action]
|
||||||
|
|
||||||
@controller.process(name)
|
@controller.process(name)
|
||||||
|
|
Loading…
Reference in a new issue