aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2009-01-25 12:29:08 +0000
committerFrederick Cheung <frederick.cheung@gmail.com>2009-01-25 12:29:08 +0000
commitadd4e878a8fde990fc49ab1ff41786a28f2389b5 (patch)
treea36edfd213ee91fbfe0cbc9d3fafd3bea82cbb59 /railties/doc/guides
parentd9412979002bdf0a30212880a2c595aa79d2539a (diff)
downloadrails-add4e878a8fde990fc49ab1ff41786a28f2389b5.tar.gz
rails-add4e878a8fde990fc49ab1ff41786a28f2389b5.tar.bz2
rails-add4e878a8fde990fc49ab1ff41786a28f2389b5.zip
lisabon -> lisbon
Diffstat (limited to 'railties/doc/guides')
-rw-r--r--railties/doc/guides/source/form_helpers.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/doc/guides/source/form_helpers.txt b/railties/doc/guides/source/form_helpers.txt
index 71393fe603..f53cb1b140 100644
--- a/railties/doc/guides/source/form_helpers.txt
+++ b/railties/doc/guides/source/form_helpers.txt
@@ -397,11 +397,11 @@ Knowing this, you can combine `select_tag` and `options_for_select` to achieve t
`options_for_select` allows you to pre-select an option by specify its value as the second argument:
----------------------------------------------------------------------------
-<%= options_for_select([['Lisabon', 1], ['Madrid', 2], ...], 2) %>
+<%= options_for_select([['Lisbon', 1], ['Madrid', 2], ...], 2) %>
output:
-<option value="1">Lisabon</option>
+<option value="1">Lisbon</option>
<option value="2" selected="selected">Madrid</option>
...
----------------------------------------------------------------------------
@@ -424,7 +424,7 @@ In most cases form controls will be tied to a specific database model and as you
@person = Person.new(:city_id => 2)
# view:
-<%= select(:person, :city_id, [['Lisabon', 1], ['Madrid', 2], ...]) %>
+<%= select(:person, :city_id, [['Lisbon', 1], ['Madrid', 2], ...]) %>
----------------------------------------------------------------------------
Notice that the third parameter, the options array, is the same kind of argument you pass to `options_for_select`. One advantage here is that you don't have to worry about pre-selecting the correct city if the user already has one -- Rails will do this for you by reading from the `@person.city_id` attribute.