diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2008-12-31 17:55:57 +0000 |
---|---|---|
committer | Frederick Cheung <frederick.cheung@gmail.com> | 2008-12-31 17:55:57 +0000 |
commit | 1f3db5a0b0cd67b35ce467af75cf5633553d0473 (patch) | |
tree | 75ac80392a819d49da3750457bef635bf7d80d03 /railties/doc/guides/source/form_helpers.txt | |
parent | 8f9f3e6e29a7d3e22096571981e8def0a374069e (diff) | |
download | rails-1f3db5a0b0cd67b35ce467af75cf5633553d0473.tar.gz rails-1f3db5a0b0cd67b35ce467af75cf5633553d0473.tar.bz2 rails-1f3db5a0b0cd67b35ce467af75cf5633553d0473.zip |
clarify option value
Diffstat (limited to 'railties/doc/guides/source/form_helpers.txt')
-rw-r--r-- | railties/doc/guides/source/form_helpers.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/doc/guides/source/form_helpers.txt b/railties/doc/guides/source/form_helpers.txt index 8fec2a122f..00a4408945 100644 --- a/railties/doc/guides/source/form_helpers.txt +++ b/railties/doc/guides/source/form_helpers.txt @@ -351,7 +351,7 @@ output: ... ---------------------------------------------------------------------------- -For input data we used a nested array where each element has two elements: option text (city name) and option value (city id). It is often the case the the internal value (the one that the form actually submits) is the id of a corresponding database object but this does not have to be the case. +For input data we used a nested array where each element has two elements: option text (city name) and option value (city id). The option value is what will get submitted to your controller. It is often the case that the option value is the id of a corresponding database object but this does not have to be the case. Knowing this, you can combine `select_tag` and `options_for_select` to achieve the desired, complete markup: |