diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-01-20 20:34:35 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-01-20 20:34:35 -0600 |
commit | a8ad6568f9fe21668df9b6b631c0cd9783cb5ab3 (patch) | |
tree | e7171c5cd9931fbfc3b48dfc2be9c6e58eae1bb5 /actionpack/lib/action_controller | |
parent | 7e4d13d357b1e8bdf42e80359de0e480ec9f5008 (diff) | |
download | rails-a8ad6568f9fe21668df9b6b631c0cd9783cb5ab3.tar.gz rails-a8ad6568f9fe21668df9b6b631c0cd9783cb5ab3.tar.bz2 rails-a8ad6568f9fe21668df9b6b631c0cd9783cb5ab3.zip |
Allow empty files to be uploaded
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/url_encoded_pair_parser.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/url_encoded_pair_parser.rb b/actionpack/lib/action_controller/url_encoded_pair_parser.rb index 93ab2255da..57594c4259 100644 --- a/actionpack/lib/action_controller/url_encoded_pair_parser.rb +++ b/actionpack/lib/action_controller/url_encoded_pair_parser.rb @@ -46,7 +46,7 @@ module ActionController when Array value.map { |v| get_typed_value(v) } when Hash - if value.has_key?(:tempfile) && value[:tempfile].size > 0 + if value.has_key?(:tempfile) && value[:filename].any? upload = value[:tempfile] upload.extend(UploadedFile) upload.original_path = value[:filename] |