From e092cae49cd82df6599765ac49d56796fdcb0cc2 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Wed, 16 May 2018 22:55:09 -0400 Subject: Add ActiveStorage::Previewer#tempdir --- activestorage/lib/active_storage/previewer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activestorage/lib') diff --git a/activestorage/lib/active_storage/previewer.rb b/activestorage/lib/active_storage/previewer.rb index 30d90493dc..e574b3cf8b 100644 --- a/activestorage/lib/active_storage/previewer.rb +++ b/activestorage/lib/active_storage/previewer.rb @@ -44,7 +44,7 @@ module ActiveStorage # end # end # - # The output tempfile is opened in the directory returned by ActiveStorage::Downloading#tempdir. + # The output tempfile is opened in the directory returned by #tempdir. def draw(*argv) #:doc: ActiveSupport::Notifications.instrument("preview.active_storage") do open_tempfile_for_drawing do |file| @@ -73,5 +73,9 @@ module ActiveStorage def logger #:doc: ActiveStorage.logger end + + def tempdir #:doc: + Dir.tmpdir + end end end -- cgit v1.2.3