aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_basics.textile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-01-20 10:33:38 +0100
committerXavier Noria <fxn@hashref.com>2011-01-20 10:33:38 +0100
commit236f1f52cdcb695ee42ec1ad384fc9bee643f435 (patch)
treed618fb10c41909f826b57e8a0589ed442d186f5a /railties/guides/source/active_record_basics.textile
parenta282301a77288252d135855d088f20de2397998e (diff)
parent94e0f1db1cf17aa86fed5d7dad50f9e82238900a (diff)
downloadrails-236f1f52cdcb695ee42ec1ad384fc9bee643f435.tar.gz
rails-236f1f52cdcb695ee42ec1ad384fc9bee643f435.tar.bz2
rails-236f1f52cdcb695ee42ec1ad384fc9bee643f435.zip
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'railties/guides/source/active_record_basics.textile')
-rw-r--r--railties/guides/source/active_record_basics.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_basics.textile b/railties/guides/source/active_record_basics.textile
index f0081b48c0..b7926f3a3b 100644
--- a/railties/guides/source/active_record_basics.textile
+++ b/railties/guides/source/active_record_basics.textile
@@ -180,7 +180,7 @@ Active Record provides a rich API for accessing data within a database. Below ar
<ruby>
# find all users named David who are Code Artists and sort by created_at in reverse chronological order
- users = User.all(:conditions => { :name => 'David', :occupation => 'Code Artist'}, :order => 'created_at DESC')
+ users = User.where(:name => 'David', :occupation => 'Code Artist').order('created_at DESC')
</ruby>
You can learn more about querying an Active Record model in the "Active Record Query Interface":"active_record_querying.html" guide.