aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorAngelo Capilleri <resca_air@MacBook-Air-di-angelo-giovanni-capilleri.local>2012-05-13 02:23:41 +0200
committerAngelo Capilleri <resca_air@MacBook-Air-di-angelo-giovanni-capilleri.local>2012-05-13 02:39:34 +0200
commit2e9c7cd5f603dd27015cddb17c6ea328e9baa0d5 (patch)
tree9fe4d8e0b5bce60611bfd5ef793e8208d1be490b /guides
parent64af96bb9c7c7a64040e5e1a63861f046ae00b0e (diff)
downloadrails-2e9c7cd5f603dd27015cddb17c6ea328e9baa0d5.tar.gz
rails-2e9c7cd5f603dd27015cddb17c6ea328e9baa0d5.tar.bz2
rails-2e9c7cd5f603dd27015cddb17c6ea328e9baa0d5.zip
Changed the changelog and documentation about
the select method (tag select) forces :include_blank if is required and no multiple and display size is one
Diffstat (limited to 'guides')
-rw-r--r--guides/source/form_helpers.textile2
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/form_helpers.textile b/guides/source/form_helpers.textile
index b6420db798..b2c05492ab 100644
--- a/guides/source/form_helpers.textile
+++ b/guides/source/form_helpers.textile
@@ -405,6 +405,8 @@ Whenever Rails sees that the internal value of an option being generated matches
TIP: The second argument to +options_for_select+ must be exactly equal to the desired internal value. In particular if the value is the integer 2 you cannot pass "2" to +options_for_select+ -- you must pass 2. Be aware of values extracted from the +params+ hash as they are all strings.
+WARNING: +:include_blank+ is forced true if the attributes +required+ is true, display +size+ is one and +multiple+ is not true.
+
h4. Select Boxes for Dealing with Models
In most cases form controls will be tied to a specific database model and as you might expect Rails provides helpers tailored for that purpose. Consistent with other form helpers, when dealing with models you drop the +_tag+ suffix from +select_tag+: