class SendFileController
Attributes
options[W]
Public Instance Methods
data()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 72 def data send_data(file_data, options) end
file()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 23 def file send_file(file_path, options) end
file_from_before_action()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 27 def file_from_before_action raise "No file sent from before action." end
options()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 19 def options @options ||= {} end
test_send_file_headers_bang()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 31 def test_send_file_headers_bang options = { type: Mime[:png], disposition: "disposition", filename: "filename" } send_data "foo", options end
test_send_file_headers_guess_type_from_extension()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 67 def test_send_file_headers_guess_type_from_extension options = { filename: params[:filename] } send_data "foo", options end
test_send_file_headers_with_bad_symbol()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 57 def test_send_file_headers_with_bad_symbol options = { type: :this_type_is_not_registered } send_data "foo", options end
test_send_file_headers_with_disposition_as_a_symbol()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 41 def test_send_file_headers_with_disposition_as_a_symbol options = { type: Mime[:png], disposition: :disposition, filename: "filename" } send_data "foo", options end
test_send_file_headers_with_mime_lookup_with_symbol()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 51 def test_send_file_headers_with_mime_lookup_with_symbol options = { type: :png } send_data "foo", options end
test_send_file_headers_with_nil_content_type()
click to toggle source
# File actionpack/test/controller/send_file_test.rb, line 62 def test_send_file_headers_with_nil_content_type options = { type: nil } send_data "foo", options end