aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorutilum <oz@utilum.com>2018-06-28 19:34:28 +0200
committerutilum <oz@utilum.com>2018-06-29 07:58:28 +0200
commit875ef6e74878dfd60e334901bb478f2cf7667d90 (patch)
treebcbbb2f9b1eb20badea4fe3c58407296c32562c8 /activestorage
parent08dde0f355e0450bc2cb7e0b4b95a0ec18d1a870 (diff)
downloadrails-875ef6e74878dfd60e334901bb478f2cf7667d90.tar.gz
rails-875ef6e74878dfd60e334901bb478f2cf7667d90.tar.bz2
rails-875ef6e74878dfd60e334901bb478f2cf7667d90.zip
Tweak Previewer::PopplerPDFPreviewer#pdftoppm_exists?
Does not warn `instance variable @pdftoppm_exists not initialized`.
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb b/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb
index 2a787362cf..69eb617d7b 100644
--- a/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb
+++ b/activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb
@@ -12,7 +12,7 @@ module ActiveStorage
end
def pdftoppm_exists?
- return @pdftoppm_exists unless @pdftoppm_exists.nil?
+ return @pdftoppm_exists if defined?(@pdftoppm_exists)
@pdftoppm_exists = system(pdftoppm_path, "-v", out: File::NULL, err: File::NULL)
end