Skip to content

Commit

Permalink
Documentation on :include_blank #579
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Feb 17, 2005
1 parent 7cac2b5 commit 96d3f15
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions actionpack/lib/action_view/helpers/form_options_helper.rb
Expand Up @@ -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

Expand Down

0 comments on commit 96d3f15

Please sign in to comment.