Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add command line to index and minor change in finders guide

  • Loading branch information...
commit 3ad392f6f98e2726c4e5e62d3f45b16ae1c1d89c 1 parent e3fd533
@lifo lifo authored
View
8 railties/doc/guides/html/active_record_querying.html
@@ -31,7 +31,7 @@ <h2 id="site_title_tagline">Sustainable productivity for web-application develop
<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 @@ <h2 id="site_title_tagline">Sustainable productivity for web-application develop
</li>
</ul></div>
<div class="paragraph"><p>If you&#8217;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 @@ <h2 id="site_title_tagline">Sustainable productivity for web-application develop
</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
View
5 railties/doc/guides/html/index.html
@@ -206,6 +206,11 @@ <h2 id="site_title_tagline">Sustainable productivity for web-application develop
<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>
View
6 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]
-------------------------------------------------------
View
5 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]
Please sign in to comment.
Something went wrong with that request. Please try again.