diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 0384740fef..3d72755f1d 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -135,7 +135,7 @@ module ActionController end def self.make_response!(request) - ActionDispatch::Response.new.tap do |res| + ActionDispatch::Response.create.tap do |res| res.request = request end end diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 667c7f87ca..c874165816 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -236,6 +236,10 @@ module ActionController end end + def initialize(status = 200, header = {}, body = []) + super(status, Header.new(self, header), body) + end + private def before_committed @@ -257,10 +261,6 @@ module ActionController buf end - def merge_default_headers(original, default) - Header.new self, super - end - def handle_conditional_get! super unless committed? end diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 47b6b5d4b3..cf78688126 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -585,7 +585,7 @@ module ActionController end def build_response(klass) - klass.new + klass.create end included do |