aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-05-24 20:47:03 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-05-24 20:47:03 +0000
commit74d1512b99e17c25de5ed42eb844374969847619 (patch)
tree302b57003c5f1993bdf0ac679a6e1255e76c891a /actionpack/lib/action_view
parentb290bc6b2f3ddefdfecd58d60bfa2517612dbad4 (diff)
downloadrails-74d1512b99e17c25de5ed42eb844374969847619.tar.gz
rails-74d1512b99e17c25de5ed42eb844374969847619.tar.bz2
rails-74d1512b99e17c25de5ed42eb844374969847619.zip
Added option to suppress :size when using :maxlength for FormTagHelper#text_field #3112 [rails@tpope.info]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-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 c985a22edb..7325aad398 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -393,7 +393,7 @@ module ActionView
def to_input_field_tag(field_type, options = {})
options = options.stringify_keys
- options["size"] ||= options["maxlength"] || DEFAULT_FIELD_OPTIONS["size"]
+ options["size"] = options["maxlength"] || DEFAULT_FIELD_OPTIONS["size"] unless options.key?("size")
options = DEFAULT_FIELD_OPTIONS.merge(options)
if field_type == "hidden"
options.delete("size")