instance method
send_file
Ruby on Rails 5.2.8.1
Since v5.2.8.1Signature
send_file(path)
Send the file stored at path as the response body.
Parameters
-
pathreq
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 346
def send_file(path)
commit!
@stream = FileBody.new(path)
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 346
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response