Browse files

Documentation on :include_blank #579

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7cac2b5 commit 96d3f152227b31e1ca2f0ac2814dda741dccaaea @dhh dhh committed Feb 17, 2005
Showing with 13 additions and 0 deletions.
  1. +13 −0 actionpack/lib/action_view/helpers/form_options_helper.rb
View
13 actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -5,6 +5,19 @@
module ActionView
module Helpers
# Provides a number of methods for turning different kinds of containers into a set of option tags.
+ # == Options
+ # The <tt>collection_select</tt>, <tt>country_select</tt>, and <tt>select</tt> methods take an <tt>options</tt> parameter, a hash.
+ #
+ # * <tt>:include_blank</tt> - set to true if the first option element of the select element is a blank. Useful if there is not a default value required for the select element.
+ # select("post", "category", Post::CATEGORIES, {:include_blank => true})
+ #
+ # Could become:
+ #
+ # <select name="post[category]">
+ # <option></option>
+ # <option>joke</option>
+ # <option>poem</option>
+ # </select>
module FormOptionsHelper
include ERB::Util

0 comments on commit 96d3f15

Please sign in to comment.