From 96b72efc001473061e69bda0c601d8bda64027f3 Mon Sep 17 00:00:00 2001 From: Jens Fahnenbruck Date: Tue, 23 Aug 2011 21:10:01 +0200 Subject: adds delegetion for eof? to AD::Http::UploadedFile if you want to read the file you may need to ask if there is something to read from --- actionpack/lib/action_dispatch/http/upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index c4a915d1ad..ce8c2729e9 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -17,7 +17,7 @@ module ActionDispatch end # Delegate these methods to the tempfile. - [:open, :path, :rewind, :size].each do |method| + [:open, :path, :rewind, :size, :eof?].each do |method| class_eval "def #{method}; @tempfile.#{method}; end" end -- cgit v1.2.3