aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 13:21:48 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 13:21:48 -0200
commit1f5b58c079cc0ae3ee217eb3f1b4c5b2273a16e1 (patch)
tree097515bd3a4345cda505e00dcd0553c0868b112f /actionview
parent9a04558593d6926a68ab093b84d1fd3d357fc61f (diff)
parent8e02dcdf4eb53aa741c73bf9cfa757ba401d2a27 (diff)
downloadrails-1f5b58c079cc0ae3ee217eb3f1b4c5b2273a16e1.tar.gz
rails-1f5b58c079cc0ae3ee217eb3f1b4c5b2273a16e1.tar.bz2
rails-1f5b58c079cc0ae3ee217eb3f1b4c5b2273a16e1.zip
Merge pull request #19012 from LeandroSNunes/api_select_tag
Corrects the API to method select_tag
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/form_tag_helper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb
index 8bb243b8b7..65a0548ffb 100644
--- a/actionview/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionview/lib/action_view/helpers/form_tag_helper.rb
@@ -84,14 +84,13 @@ module ActionView
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
# * <tt>:include_blank</tt> - If set to true, an empty option will be created. If set to a string, the string will be used as the option's content and the value will be empty.
# * <tt>:prompt</tt> - Create a prompt option with blank value and the text asking user to select something.
- # * <tt>:selected</tt> - Provide a default selected value. It should be of the exact type as the provided options.
# * Any other key creates standard HTML attributes for the tag.
#
# ==== Examples
# select_tag "people", options_from_collection_for_select(@people, "id", "name")
# # <select id="people" name="people"><option value="1">David</option></select>
#
- # select_tag "people", options_from_collection_for_select(@people, "id", "name"), selected: ["1", "David"]
+ # select_tag "people", options_from_collection_for_select(@people, "id", "name", "1")
# # <select id="people" name="people"><option value="1" selected="selected">David</option></select>
#
# select_tag "people", "<option>David</option>".html_safe