instance method
body=
Ruby on Rails 7.2.3
Since v3.0.20Signature
body=(body)
Allows you to manually set or override the response body.
Parameters
-
bodyreq
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 353
def body=(body)
if body.respond_to?(:to_path)
@stream = body
else
synchronize do
@stream = build_buffer self, munge_body_object(body)
end
end
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 353
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response