Permalink
Browse files

Add options_from_collection_for_select to select_tag doco [hat-tip to…

… anathematic]
  • Loading branch information...
1 parent c4083ed commit b67dc00eae310f61e02f1cae27ec78eb8c1c599b @radar radar committed Dec 16, 2009
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -55,6 +55,9 @@ def form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block)
# * 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>
#

0 comments on commit b67dc00

Please sign in to comment.