diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-17 14:46:45 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-17 14:46:45 -0300 |
commit | b77d10f6fe4a66be09afef9f04f4abfe99af7e35 (patch) | |
tree | 1563c8f3f3b1c58469175540d21b2458b48a12a9 /actionpack/lib/action_dispatch | |
parent | 27a0a4b69b873a9d36f23fb734fc89f564b63a8d (diff) | |
parent | e601728dceb779b6b2aae800c66eb8b3f20f9aaa (diff) | |
download | rails-b77d10f6fe4a66be09afef9f04f4abfe99af7e35.tar.gz rails-b77d10f6fe4a66be09afef9f04f4abfe99af7e35.tar.bz2 rails-b77d10f6fe4a66be09afef9f04f4abfe99af7e35.zip |
Merge pull request #14755 from timlinquist/to_io_http_upload
Use common to_io so users can access the underlying IO object
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/upload.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index a8d2dc3950..afbfa58bce 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -31,6 +31,11 @@ module ActionDispatch @headers = hash[:head] end + # Shortcut for working directly with +tempfile+ + def to_io + @tempfile + end + # Shortcut for +tempfile.read+. def read(length=nil, buffer=nil) @tempfile.read(length, buffer) |