diff options
author | Stephen Celis <stephen@stephencelis.com> | 2010-01-05 08:32:00 -0600 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-14 01:07:04 +0100 |
commit | 2835ec6134b1e5b706824b568dfaba24672b7409 (patch) | |
tree | 59e6374eea994e65c08132cff7824ba75ff25b4d /actionpack/lib | |
parent | 214b548485f9313639059e8de1ad08611f734fe2 (diff) | |
download | rails-2835ec6134b1e5b706824b568dfaba24672b7409.tar.gz rails-2835ec6134b1e5b706824b568dfaba24672b7409.tar.bz2 rails-2835ec6134b1e5b706824b568dfaba24672b7409.zip |
Custom 'type' attribute support for text_field. [#3646 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 |
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 fe060921ff..11ac3ad6f3 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -798,7 +798,7 @@ module ActionView if field_type == "hidden" options.delete("size") end - options["type"] = field_type + options["type"] ||= field_type options["value"] ||= value_before_type_cast(object) unless field_type == "file" options["value"] &&= html_escape(options["value"]) add_default_name_and_id(options) |