aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
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