instance method
body=
Ruby on Rails 4.0.13
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 195
def body=(body)
@blank = true if body == EMPTY
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 195
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response