diff options
author | Sergio Gil Pérez de la Manga <sgilperez@gmail.com> | 2012-09-22 22:37:00 +0200 |
---|---|---|
committer | Sergio Gil Pérez de la Manga <sgilperez@gmail.com> | 2012-09-22 22:37:00 +0200 |
commit | e9ba548baf74cc3a5ec65135dac385d81e14f06e (patch) | |
tree | 0d6c38dd3d0b75e364398dfff8c9b1b41eb12893 /actionpack/lib/action_dispatch | |
parent | f3afaa64cf13f15b2a6199d1be8fa4ce9f3fd612 (diff) | |
download | rails-e9ba548baf74cc3a5ec65135dac385d81e14f06e.tar.gz rails-e9ba548baf74cc3a5ec65135dac385d81e14f06e.tar.bz2 rails-e9ba548baf74cc3a5ec65135dac385d81e14f06e.zip |
Accept parameters in methods delegated to tempfile
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/upload.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index 42da35edec..d50c8cad17 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -12,13 +12,9 @@ module ActionDispatch @headers = hash[:head] end - def read(*args) - @tempfile.read(*args) - end - # Delegate these methods to the tempfile. - [:open, :close, :path, :rewind, :size, :eof?].each do |method| - class_eval "def #{method}; @tempfile.#{method}; end" + [:read, :open, :close, :path, :rewind, :size, :eof?].each do |method| + class_eval "def #{method}(*args); @tempfile.#{method}(*args); end" end private |