aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-07-07 20:44:49 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-07-07 20:44:49 +0530
commitee20be7c33538e6e9d334ddbd16d427190c7ff00 (patch)
treee6551251983948768cf4a315822f6d8b50fd00dd /guides/source
parent5fde4d47938661b77d8b58bec63d64b66c33ced9 (diff)
parent700e5ffea261de09c6e12b5077597320ba1ffbd1 (diff)
downloadrails-ee20be7c33538e6e9d334ddbd16d427190c7ff00.tar.gz
rails-ee20be7c33538e6e9d334ddbd16d427190c7ff00.tar.bz2
rails-ee20be7c33538e6e9d334ddbd16d427190c7ff00.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_querying.textile28
1 files changed, 16 insertions, 12 deletions
diff --git a/guides/source/active_record_querying.textile b/guides/source/active_record_querying.textile
index 101988c59e..9863d16fda 100644
--- a/guides/source/active_record_querying.textile
+++ b/guides/source/active_record_querying.textile
@@ -12,8 +12,6 @@ This guide covers different ways to retrieve data from the database using Active
endprologue.
-WARNING. This Guide is based on Rails 3.0. Some of the code shown here will not work in other versions of Rails.
-
If you're used to using raw SQL to find database records, then you will generally find that there are better ways to carry out the same operations in Rails. Active Record insulates you from the need to use SQL in most cases.
Code examples throughout this guide will refer to one or more of the following models:
@@ -53,20 +51,26 @@ h3. Retrieving Objects from the Database
To retrieve objects from the database, Active Record provides several finder methods. Each finder method allows you to pass arguments into it to perform certain queries on your database without writing raw SQL.
The methods are:
-* +where+
-* +select+
+* +bind+
+* +create_with+
+* +extending+
+* +from+
* +group+
-* +order+
-* +reorder+
-* +reverse_order+
-* +limit+
-* +offset+
-* +joins+
+* +having+
* +includes+
+* +joins+
+* +limit+
* +lock+
+* +offset+
+* +order+
+* +none+
* +readonly+
-* +from+
-* +having+
+* +references+
+* +reorder+
+* +reverse_order+
+* +select+
+* +uniq+
+* +where+
All of the above methods return an instance of <tt>ActiveRecord::Relation</tt>.