diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/http/response.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 2fab6be1a5..4061ea71a3 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -274,12 +274,13 @@ module ActionDispatch # :nodoc: end # Turns the Response into a Rack-compatible array of the status, headers, - # and body. + # and body. Allows explict splatting: + # + # status, headers, body = *response def to_a rack_response @status, @header.to_hash end alias prepare! to_a - alias to_ary to_a # Returns the response cookies, converted to a Hash of (name => value) pairs # @@ -298,9 +299,6 @@ module ActionDispatch # :nodoc: cookies end - def _status_code - @status - end private def before_committed @@ -369,6 +367,10 @@ module ActionDispatch # :nodoc: def to_path @response.stream.to_path end + + def to_ary + nil + end end def rack_response(status, header) |