Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement to_io as an alias

  • Loading branch information...
commit 6a13ed7fbb234decc58fac585d08bdc1a8cee07f 1 parent b77d10f
@rafaelfranca rafaelfranca authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 actionpack/lib/action_dispatch/http/upload.rb
View
6 actionpack/lib/action_dispatch/http/upload.rb
@@ -18,6 +18,7 @@ class UploadedFile
# A +Tempfile+ object with the actual uploaded file. Note that some of
# its interface is available directly.
attr_accessor :tempfile
+ alias :to_io :tempfile
# A string with the headers of the multipart request.
attr_accessor :headers
@@ -31,11 +32,6 @@ def initialize(hash) # :nodoc:
@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)
Please sign in to comment.
Something went wrong with that request. Please try again.