instance method
send_file
Ruby on Rails 6.0.6
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 360
def send_file(path)
commit!
@stream = FileBody.new(path)
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 360
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response