diff options
Diffstat (limited to 'railties/doc/guides/source')
-rw-r--r-- | railties/doc/guides/source/active_record_querying.txt | 6 | ||||
-rw-r--r-- | railties/doc/guides/source/index.txt | 5 |
2 files changed, 8 insertions, 3 deletions
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] |