diff options
author | George Claghorn <george@basecamp.com> | 2018-05-17 19:14:11 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-05-17 19:14:11 -0400 |
commit | 9f95767979579f5761cb0d2bcccb67f3662349c5 (patch) | |
tree | 9375eeeeff7d494e2dcf0b206e89ea892cb21f4a /activestorage/lib/active_storage/previewer.rb | |
parent | f018d4e118f34fd9b54ad45771ed575936678158 (diff) | |
download | rails-9f95767979579f5761cb0d2bcccb67f3662349c5.tar.gz rails-9f95767979579f5761cb0d2bcccb67f3662349c5.tar.bz2 rails-9f95767979579f5761cb0d2bcccb67f3662349c5.zip |
Permit opening a blob in a custom tempdir
Diffstat (limited to 'activestorage/lib/active_storage/previewer.rb')
-rw-r--r-- | activestorage/lib/active_storage/previewer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/previewer.rb b/activestorage/lib/active_storage/previewer.rb index f09dc25879..bff5e42d41 100644 --- a/activestorage/lib/active_storage/previewer.rb +++ b/activestorage/lib/active_storage/previewer.rb @@ -26,7 +26,7 @@ module ActiveStorage private # Downloads the blob to a tempfile on disk. Yields the tempfile. def download_blob_to_tempfile(&block) #:doc: - blob.open(&block) + blob.open tempdir: tempdir, &block end # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile. |