From 4d566eec7837a2dbfa4072efc9d73333cd61c797 Mon Sep 17 00:00:00 2001 From: ZENATI YASSINE Date: Wed, 16 Apr 2014 21:41:10 +0200 Subject: [ci skip] Added examples for search_field_tag method --- actionview/lib/action_view/helpers/form_tag_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionview/lib/action_view/helpers/form_tag_helper.rb') diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index d0ed7ae5eb..135173a339 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -571,6 +571,19 @@ module ActionView # # ==== Options # * Accepts the same options as text_field_tag. + # + # ==== Examples + # search_field_tag 'name' + # # => + # + # search_field_tag 'search', 'Enter your search query here' + # # => + # + # search_field_tag 'search', nil, class: 'special_input' + # # => + # + # search_field_tag 'search', 'Enter your search query here', class: 'special_input', disabled: true + # # => def search_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "search")) end -- cgit v1.2.3