diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-01-17 17:31:23 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-01-17 17:31:23 +0000 |
commit | 3ad392f6f98e2726c4e5e62d3f45b16ae1c1d89c (patch) | |
tree | 68c71ff4feeb5d2d4dc65902dfe4deda065a0a8a /railties/doc | |
parent | e3fd533d031b6411bbb99b3da94dfb3ec8e0bfdf (diff) | |
download | rails-3ad392f6f98e2726c4e5e62d3f45b16ae1c1d89c.tar.gz rails-3ad392f6f98e2726c4e5e62d3f45b16ae1c1d89c.tar.bz2 rails-3ad392f6f98e2726c4e5e62d3f45b16ae1c1d89c.zip |
Add command line to index and minor change in finders guide
Diffstat (limited to 'railties/doc')
-rw-r--r-- | railties/doc/guides/html/active_record_querying.html | 8 | ||||
-rw-r--r-- | railties/doc/guides/html/index.html | 5 | ||||
-rw-r--r-- | railties/doc/guides/source/active_record_querying.txt | 6 | ||||
-rw-r--r-- | railties/doc/guides/source/index.txt | 5 |
4 files changed, 17 insertions, 7 deletions
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 @@ <h2>Chapters</h2> <ol> <li> - <a href="#_ids_first_last_and_all">IDs, First, Last and All</a> + <a href="#_retrieving_objects">Retrieving objects</a> </li> <li> <a href="#_conditions">Conditions</a> @@ -172,7 +172,7 @@ Perform various calculations on Active Record models </li>
</ul></div>
<div class="paragraph"><p>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.</p></div>
-<div class="paragraph"><p>Code examples in this guide use one or more of the following models:</p></div>
+<div class="paragraph"><p>Code examples throughout this guide will refer to one or more of the following models:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
@@ -221,9 +221,9 @@ http://www.gnu.org/software/src-highlite --> </div></div>
</div>
</div>
-<h2 id="_ids_first_last_and_all">1. IDs, First, Last and All</h2>
+<h2 id="_retrieving_objects">1. Retrieving objects</h2>
<div class="sectionbody">
-<div class="paragraph"><p>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 <tt>find</tt>. 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 <tt>Client.find(1)</tt> which would execute this query on your database:</p></div>
+<div class="paragraph"><p>To retrieve objects from the database, Active Record provides a primary method called <tt>find</tt>. 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 <tt>Client.find(1)</tt> which would execute this query on your database:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
diff --git a/railties/doc/guides/html/index.html b/railties/doc/guides/html/index.html index 8552848ae6..d1bea57d14 100644 --- a/railties/doc/guides/html/index.html +++ b/railties/doc/guides/html/index.html @@ -206,6 +206,11 @@ of your code.</p></div> <div class="sidebar-title"><a href="configuring.html">Configuring Rails Applications</a></div>
<div class="paragraph"><p>This guide covers the basic configuration settings for a Rails application.</p></div>
</div></div>
+<div class="sidebarblock">
+<div class="sidebar-content">
+<div class="sidebar-title"><a href="command_line.html">Rails Command Line Tools and Rake tasks</a></div>
+<div class="paragraph"><p>This guide covers the command line tools and rake tasks provided by Rails.</p></div>
+</div></div>
<div class="paragraph"><p>Authors who have contributed to complete guides are listed <a href="authors.html">here</a>.</p></div>
<div class="paragraph"><p>This work is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 License</a></p></div>
</div>
diff --git a/railties/doc/guides/source/active_record_querying.txt b/railties/doc/guides/source/active_record_querying.txt index ca88c54afb..c0aa5482d5 100644 --- a/railties/doc/guides/source/active_record_querying.txt +++ b/railties/doc/guides/source/active_record_querying.txt @@ -13,7 +13,7 @@ This guide covers different ways to retrieve data from the database using Active 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: [source,ruby] ------------------------------------------------------- @@ -56,9 +56,9 @@ end Active Record will perform queries on the database for you and is compatible with most database systems (MySQL, PostgreSQL and SQLite to name a few). Regardless of which database system you're using, the Active Record method format will always be the same. **** -== IDs, First, Last and All +== 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: [source, sql] ------------------------------------------------------- diff --git a/railties/doc/guides/source/index.txt b/railties/doc/guides/source/index.txt index 7a0987b86a..9141a5292a 100644 --- a/railties/doc/guides/source/index.txt +++ b/railties/doc/guides/source/index.txt @@ -135,6 +135,11 @@ This guide introduces you to the basic concepts and features of the Rails I18n A This guide covers the basic configuration settings for a Rails application. *********************************************************** +.link:command_line.html[Rails Command Line Tools and Rake tasks] +*********************************************************** +This guide covers the command line tools and rake tasks provided by Rails. +*********************************************************** + Authors who have contributed to complete guides are listed link:authors.html[here]. This work is licensed under a link:http://creativecommons.org/licenses/by-nc-sa/3.0/[Creative Commons Attribution-Noncommercial-Share Alike 3.0 License] |