Module: Snippets::SendBlob

Includes:
SendsBlob
Included in:
BlobsActions, SnippetsActions
Defined in:
app/controllers/concerns/snippets/send_blob.rb

Instance Method Summary collapse

Methods included from SendsBlob

#send_blob

Instance Method Details

#send_snippet_blob(snippet, blob) ⇒ Object


6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/concerns/snippets/send_blob.rb', line 6

def send_snippet_blob(snippet, blob)
  workhorse_set_content_type!

  send_blob(
    snippet.repository,
    blob,
    inline: content_disposition == 'inline',
    allow_caching: snippet.public?
  )
end