aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2009-01-25 12:31:46 +0000
committerFrederick Cheung <frederick.cheung@gmail.com>2009-01-25 12:31:46 +0000
commit13e4b02a5c603b9368448febe09254e2b2dcbc1a (patch)
tree21ee29df44f6777e16df33c4f32eb049e6cdb219 /railties/doc/guides/source
parentbf26f42d77eca61acc9affecd5a2aec9ad61beda (diff)
downloadrails-13e4b02a5c603b9368448febe09254e2b2dcbc1a.tar.gz
rails-13e4b02a5c603b9368448febe09254e2b2dcbc1a.tar.bz2
rails-13e4b02a5c603b9368448febe09254e2b2dcbc1a.zip
find :all -> .all
Diffstat (limited to 'railties/doc/guides/source')
-rw-r--r--railties/doc/guides/source/form_helpers.txt2
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 055dc20553..a17c7e5249 100644
--- a/railties/doc/guides/source/form_helpers.txt
+++ b/railties/doc/guides/source/form_helpers.txt
@@ -453,7 +453,7 @@ Option tags from a collection of arbitrary objects
Generating options tags with `options_for_select` requires that you create an array containing the text and value for each option. But what if you had a City model (perhaps an Active Record one) and you wanted to generate option tags from a collection of those objects? One solution would be to make a nested array by iterating over them:
----------------------------------------------------------------------------
-<% cities_array = City.find(:all).map { |city| [city.name, city.id] } %>
+<% cities_array = City.all.map { |city| [city.name, city.id] } %>
<%= options_for_select(cities_array) %>
----------------------------------------------------------------------------