aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-23 02:26:23 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-23 02:26:23 +0000
commita4a8c5e7bf5afdf4deaad1b02aa204fba8292aae (patch)
tree9758d4882a14d47f22e69c6d917316d2e1d98c5a /actionpack
parente712f63872b57e6027601a519080d56b0bb75f3d (diff)
downloadrails-a4a8c5e7bf5afdf4deaad1b02aa204fba8292aae.tar.gz
rails-a4a8c5e7bf5afdf4deaad1b02aa204fba8292aae.tar.bz2
rails-a4a8c5e7bf5afdf4deaad1b02aa204fba8292aae.zip
Show value when NOT file
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index b5a4403f76..2c9589194c 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -152,7 +152,7 @@ module ActionView
html_options.merge!({ "size" => options["maxlength"]}) if options["maxlength"] && !options["size"]
html_options.delete("size") if field_type == "hidden"
html_options.merge!({ "type" => field_type})
- html_options.merge!({ "value" => value_before_type_cast }) if options["value"].nil? || field_type == "file"
+ html_options.merge!({ "value" => value_before_type_cast }) if options["value"].nil? && field_type != "file"
add_default_name_and_id(html_options)
tag("input", html_options)
end