mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
64af96bb9c
commit
2e9c7cd5f6
2 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
## Rails 4.0.0 (unreleased) ##
|
||||
|
||||
* The `select` method (select tag) forces :include_blank if `required` is true and
|
||||
`display size` is one and `multiple` is not true. *Angelo Capilleri*
|
||||
|
||||
* `respond_to` and `respond_with` now raise ActionController::UnknownFormat instead
|
||||
of directly returning head 406. The exception is rescued and converted to 406
|
||||
in the exception handling middleware. *Steven Soroka*
|
||||
|
|
|
@ -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+:
|
||||
|
|
Loading…
Reference in a new issue