diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-04 17:11:50 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-04 17:11:50 -0700 |
commit | 3370ad0b1e883c9ec24c771f6c52b296a71eff40 (patch) | |
tree | a1180927a1d7595ae395820c695c792517dc43ea /actionpack/lib/action_dispatch/http/upload.rb | |
parent | 8a9747021085c569f0118db1093bc12cfa2ba915 (diff) | |
download | rails-3370ad0b1e883c9ec24c771f6c52b296a71eff40.tar.gz rails-3370ad0b1e883c9ec24c771f6c52b296a71eff40.tar.bz2 rails-3370ad0b1e883c9ec24c771f6c52b296a71eff40.zip |
making sure respond_to? works properly
Diffstat (limited to 'actionpack/lib/action_dispatch/http/upload.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/upload.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index d4fabe1eaf..53f8039121 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -13,7 +13,12 @@ module ActionDispatch raise(ArgumentError, ':tempfile is required') unless @tempfile end + def respond_to?(name) + super || @tempfile.respond_to?(name) + end + def method_missing(name, *args, &block) + return super unless respond_to?(name) @tempfile.send(name, *args, &block) end end |