diff options
author | ZENATI YASSINE <zenati@informatique.univ-paris-diderot.fr> | 2014-04-16 21:41:10 +0200 |
---|---|---|
committer | ZENATI YASSINE <zenati@informatique.univ-paris-diderot.fr> | 2014-04-16 21:41:10 +0200 |
commit | 4d566eec7837a2dbfa4072efc9d73333cd61c797 (patch) | |
tree | 65fceaab0c1a01d51419a88c39be6970564805f0 | |
parent | 11eb1e3381d77d93fe5f182fde9ce71356d1e0e8 (diff) | |
download | rails-4d566eec7837a2dbfa4072efc9d73333cd61c797.tar.gz rails-4d566eec7837a2dbfa4072efc9d73333cd61c797.tar.bz2 rails-4d566eec7837a2dbfa4072efc9d73333cd61c797.zip |
[ci skip] Added examples for search_field_tag method
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
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' + # # => <input id="name" name="name" type="search" /> + # + # search_field_tag 'search', 'Enter your search query here' + # # => <input id="search" name="search" type="search" value="Enter your search query here" /> + # + # search_field_tag 'search', nil, class: 'special_input' + # # => <input class="special_input" id="search" name="search" type="search" /> + # + # search_field_tag 'search', 'Enter your search query here', class: 'special_input', disabled: true + # # => <input disabled="disabled" class="special_input" id="search" name="search" type="search" value="Enter your search query here" /> def search_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "search")) end |