instance method
body
Ruby on Rails 8.0.4
Since v3.0.20Signature
body()
Returns the content of the response as a string. This contains the contents of any calls to render.
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 356
def body
if @stream.respond_to?(:to_ary)
@stream.to_ary.join
elsif @stream.respond_to?(:body)
@stream.body
else
@stream
end
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 356
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response