From 1f3db5a0b0cd67b35ce467af75cf5633553d0473 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Wed, 31 Dec 2008 17:55:57 +0000 Subject: clarify option value --- railties/doc/guides/source/form_helpers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') 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: -- cgit v1.2.3