aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2009-12-16 18:28:04 +1000
committerRyan Bigg <radarlistener@gmail.com>2009-12-16 18:28:04 +1000
commitb67dc00eae310f61e02f1cae27ec78eb8c1c599b (patch)
treecc8f92c9bcb2aaf1c95ce5e80e17c9256b0ce7c6 /actionpack
parentc4083ed4c349d3a0e778140d8ba5d565a15a68e4 (diff)
downloadrails-b67dc00eae310f61e02f1cae27ec78eb8c1c599b.tar.gz
rails-b67dc00eae310f61e02f1cae27ec78eb8c1c599b.tar.bz2
rails-b67dc00eae310f61e02f1cae27ec78eb8c1c599b.zip
Add options_from_collection_for_select to select_tag doco [hat-tip to anathematic]
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 7688e786b1..048bedc7ba 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -55,6 +55,9 @@ module ActionView
# * Any other key creates standard HTML attributes for the tag.
#
# ==== Examples
+ # select_tag "people", options_from_collection_for_select(@people, "name", "id")
+ # # <select id="people" name="people"><option value="1">David</option></select>
+ #
# select_tag "people", "<option>David</option>"
# # => <select id="people" name="people"><option>David</option></select>
#