From 3ad392f6f98e2726c4e5e62d3f45b16ae1c1d89c Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 17 Jan 2009 17:31:23 +0000 Subject: Add command line to index and minor change in finders guide --- railties/doc/guides/html/active_record_querying.html | 8 ++++---- railties/doc/guides/html/index.html | 5 +++++ railties/doc/guides/source/active_record_querying.txt | 6 +++--- railties/doc/guides/source/index.txt | 5 +++++ 4 files changed, 17 insertions(+), 7 deletions(-) (limited to 'railties/doc/guides') diff --git a/railties/doc/guides/html/active_record_querying.html b/railties/doc/guides/html/active_record_querying.html index cc2a6b7e4a..e42bd80e2b 100644 --- a/railties/doc/guides/html/active_record_querying.html +++ b/railties/doc/guides/html/active_record_querying.html @@ -31,7 +31,7 @@

Chapters

  1. - IDs, First, Last and All + Retrieving objects
  2. Conditions @@ -172,7 +172,7 @@ Perform various calculations on Active Record models
  3. If you’re used to using raw SQL to find database records then, generally, you will 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 in this guide use one or more of the following models:

    +

    Code examples throughout this guide will refer to one or more of the following models:

    -

    1. IDs, First, Last and All

    +

    1. Retrieving objects

    -

    ActiveRecord::Base has methods defined on it to make interacting with your database and the tables within it much, much easier. For finding records, the key method is find. This method allows you to pass arguments into it to perform certain queries on your database without the need of SQL. If you wanted to find the record with the id of 1, you could type Client.find(1) which would execute this query on your database:

    +

    To retrieve objects from the database, Active Record provides a primary method called find. This method allows you to pass arguments into it to perform certain queries on your database without the need of SQL. If you wanted to find the record with the id of 1, you could type Client.find(1) which would execute this query on your database: