From a4a8c5e7bf5afdf4deaad1b02aa204fba8292aae Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 23 Feb 2005 02:26:23 +0000 Subject: Show value when NOT file git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') 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 -- cgit v1.2.3