From c0c646f45fbb716d066e909153d445f63e9dfc3a Mon Sep 17 00:00:00 2001 From: ZENATI YASSINE Date: Wed, 16 Apr 2014 21:53:20 +0200 Subject: [PATCH] [ci skip] Added examples for url_field_tag method --- .../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 206e11f0a5ae0..b4a841b94653f 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -677,6 +677,19 @@ def week_field_tag(name, value = nil, options = {}) # # ==== Options # * Accepts the same options as text_field_tag. + # + # ==== Examples + # url_field_tag 'name' + # # => + # + # url_field_tag 'url', 'http://rubyonrails.org' + # # => + # + # url_field_tag 'url', nil, class: 'special_input' + # # => + # + # url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true + # # => def url_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "url")) end