instance method
to_a
Ruby on Rails 6.0.6
Since v3.0.20Signature
to_a()
Turns the Response into a Rack-compatible array of the status, headers, and body. Allows explicit splatting:
status, headers, body = *response
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 397
def to_a
commit!
rack_response @status, @header.to_hash
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 397
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response