From add4e878a8fde990fc49ab1ff41786a28f2389b5 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Sun, 25 Jan 2009 12:29:08 +0000 Subject: lisabon -> lisbon --- railties/doc/guides/source/form_helpers.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/doc/guides') 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: - + ... ---------------------------------------------------------------------------- @@ -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. -- cgit v1.2.3