From acfadacb07f8fbf6900413909519ff920b1ade72 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Tue, 20 Jul 2021 09:32:44 -0500 Subject: [PATCH] Fix ActiveStorage::Preview#download method doc [ci-skip] Follow-up to #42742. --- activestorage/app/models/active_storage/preview.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/activestorage/app/models/active_storage/preview.rb b/activestorage/app/models/active_storage/preview.rb index 1af247bb2a..e316cab71e 100644 --- a/activestorage/app/models/active_storage/preview.rb +++ b/activestorage/app/models/active_storage/preview.rb @@ -75,13 +75,11 @@ class ActiveStorage::Preview end end - # Downloads the file associated with this preview's variant. - # Raises ActiveStorage::Preview::UnprocessedError if the preview has not been processed yet. - # - # Downloads the file associated with this variant. If no block is given, the - # entire file is read into memory and returned. That'll use a lot of RAM for - # very large files. If a block is given, then the download is streamed and - # yielded in chunks. + # Downloads the file associated with this preview's variant. If no block is + # given, the entire file is read into memory and returned. That'll use a lot + # of RAM for very large files. If a block is given, then the download is + # streamed and yielded in chunks. Raises ActiveStorage::Preview::UnprocessedError + # if the preview has not been processed yet. def download(&block) if processed? variant.download(&block)