aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-05-16 22:55:09 -0400
committerGeorge Claghorn <george@basecamp.com>2018-05-16 22:55:09 -0400
commite092cae49cd82df6599765ac49d56796fdcb0cc2 (patch)
treea11345c9758e9335596a434773889551c76b5839 /activestorage/lib
parentff3210556b89fdb3fe289117fa72ba3155231442 (diff)
downloadrails-e092cae49cd82df6599765ac49d56796fdcb0cc2.tar.gz
rails-e092cae49cd82df6599765ac49d56796fdcb0cc2.tar.bz2
rails-e092cae49cd82df6599765ac49d56796fdcb0cc2.zip
Add ActiveStorage::Previewer#tempdir
Diffstat (limited to 'activestorage/lib')
-rw-r--r--activestorage/lib/active_storage/previewer.rb6
1 files changed, 5 insertions, 1 deletions
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