From 129205157b231e90ad8612630daeca9214d424d8 Mon Sep 17 00:00:00 2001 From: ZENATI YASSINE Date: Wed, 16 Apr 2014 21:49:39 +0200 Subject: [ci skip] Added examples for telephone_field_tag method --- actionview/lib/action_view/helpers/form_tag_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 135173a339..206e11f0a5 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -592,6 +592,19 @@ module ActionView # # ==== Options # * Accepts the same options as text_field_tag. + # + # ==== Examples + # telephone_field_tag 'name' + # # => + # + # telephone_field_tag 'tel', '0123456789' + # # => + # + # telephone_field_tag 'tel', nil, class: 'special_input' + # # => + # + # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true + # # => def telephone_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "tel")) end -- cgit v1.2.3