diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-17 14:48:51 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-17 14:48:51 -0300 |
commit | 6a13ed7fbb234decc58fac585d08bdc1a8cee07f (patch) | |
tree | fbec3be6c478e8db9b7acf87f0764573bdcfc205 /actionpack | |
parent | b77d10f6fe4a66be09afef9f04f4abfe99af7e35 (diff) | |
download | rails-6a13ed7fbb234decc58fac585d08bdc1a8cee07f.tar.gz rails-6a13ed7fbb234decc58fac585d08bdc1a8cee07f.tar.bz2 rails-6a13ed7fbb234decc58fac585d08bdc1a8cee07f.zip |
Implement to_io as an alias
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/upload.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index afbfa58bce..45bf751d09 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -18,6 +18,7 @@ module ActionDispatch # 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 @@ 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) |