From 6a13ed7fbb234decc58fac585d08bdc1a8cee07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 17 Apr 2014 14:48:51 -0300 Subject: Implement to_io as an alias --- actionpack/lib/action_dispatch/http/upload.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'actionpack/lib/action_dispatch') 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) -- cgit v1.2.3