aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_basics.textile
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-01-14 22:51:15 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-01-14 22:51:15 +0530
commit93c208a630e5cd96071ed5581fcd1c23708b3817 (patch)
tree5ebe7daba29ba0559322028156f5d6c47a04adf9 /railties/guides/source/active_record_basics.textile
parent31767b003227148ce06b7c8df0f533b7cdeddd9b (diff)
downloadrails-93c208a630e5cd96071ed5581fcd1c23708b3817.tar.gz
rails-93c208a630e5cd96071ed5581fcd1c23708b3817.tar.bz2
rails-93c208a630e5cd96071ed5581fcd1c23708b3817.zip
use new AR api
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.