aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib
diff options
context:
space:
mode:
authorIsaac Betesh <iybetesh@gmail.com>2017-08-11 10:30:41 -0400
committerIsaac Betesh <iybetesh@gmail.com>2017-08-11 14:43:19 -0400
commit4287f089d351804a4b2cc0a6df685b010721157c (patch)
treeff86ed769132f0bea23dec551943438f5ce0bd1f /activestorage/lib
parente43ba973a3ac34ad32b08caff99ec306ffe9fdd4 (diff)
downloadrails-4287f089d351804a4b2cc0a6df685b010721157c.tar.gz
rails-4287f089d351804a4b2cc0a6df685b010721157c.tar.bz2
rails-4287f089d351804a4b2cc0a6df685b010721157c.zip
Make activestorage treat Rack::Test::UploadedFile just like ActionDispatch::Http::UploadedFile
Diffstat (limited to 'activestorage/lib')
-rw-r--r--activestorage/lib/active_storage/attached.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/attached.rb b/activestorage/lib/active_storage/attached.rb
index 5ac8ba5377..68881b8ee1 100644
--- a/activestorage/lib/active_storage/attached.rb
+++ b/activestorage/lib/active_storage/attached.rb
@@ -17,7 +17,7 @@ module ActiveStorage
case attachable
when ActiveStorage::Blob
attachable
- when ActionDispatch::Http::UploadedFile
+ when ActionDispatch::Http::UploadedFile, Rack::Test::UploadedFile
ActiveStorage::Blob.create_after_upload! \
io: attachable.open,
filename: attachable.original_filename,