Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Show value when NOT file

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit a4a8c5e7bf5afdf4deaad1b02aa204fba8292aae 1 parent e712f63
@dhh dhh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/form_helper.rb
View
2  actionpack/lib/action_view/helpers/form_helper.rb
@@ -152,7 +152,7 @@ def to_input_field_tag(field_type, options = {})
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
Please sign in to comment.
Something went wrong with that request. Please try again.