--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sends the given binary data to the browser. This method is similar to <tt>render :text =&gt; data</tt>, but also allows you to specify whether the browser should display the response as a file attachment (i.e. in a download dialog) or as inline data. You may also set the content type, the apparent file name, and other things.
- !ruby/struct:SM::Flow::P 
  body: "Options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:filename</tt> - suggests a filename for the browser to use.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:type</tt> - specifies an HTTP content type. Defaults to 'application/octet-stream'. You can specify either a string or a symbol for a registered type register with <tt>Mime::Type.register</tt>, for example :json
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:disposition</tt> - specifies whether the file will be shown inline or downloaded. Valid values are 'inline' and 'attachment' (default).
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:status</tt> - specifies the status code to send with the response. Defaults to '200 OK'.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Generic data download:"
- !ruby/struct:SM::Flow::VERB 
  body: "  send_data buffer\n"
- !ruby/struct:SM::Flow::P 
  body: "Download a dynamically-generated tarball:"
- !ruby/struct:SM::Flow::VERB 
  body: "  send_data generate_tgz('dir'), :filename =&gt; 'dir.tgz'\n"
- !ruby/struct:SM::Flow::P 
  body: "Display an image Active Record in the browser:"
- !ruby/struct:SM::Flow::VERB 
  body: "  send_data image.data, :type =&gt; image.content_type, :disposition =&gt; 'inline'\n"
- !ruby/struct:SM::Flow::P 
  body: See <tt>send_file</tt> for more information on HTTP Content-* headers and caching.
- !ruby/struct:SM::Flow::P 
  body: <b>Tip:</b> if you want to stream large amounts of on-the-fly generated data to the browser, then use <tt>render :text =&gt; proc { ... }</tt> instead. See ActionController::Base#render for more information.
full_name: ActionController::Streaming#send_data
is_singleton: false
name: send_data
params: (data, options = {})
visibility: protected
