From 8a681d8ae0897062a65a3d50e8a6a6483a43c3c3 Mon Sep 17 00:00:00 2001 From: Sergio Date: Tue, 10 Sep 2013 18:38:59 +0200 Subject: Plural of Deer not deer Change the plural of Deer word in the naming conventions --- guides/source/active_record_basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/active_record_basics.md') diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index a80c3b6c8e..ad08cb01f7 100644 --- a/guides/source/active_record_basics.md +++ b/guides/source/active_record_basics.md @@ -86,7 +86,7 @@ by underscores. Examples: | ------------- | -------------- | | `Post` | `posts` | | `LineItem` | `line_items` | -| `Deer` | `deer` | +| `Deer` | `deers` | | `Mouse` | `mice` | | `Person` | `people` | -- cgit v1.2.3 From ec6608ace39dacd4cbdf668ff87bee692b59944b Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Thu, 26 Sep 2013 15:26:03 +0800 Subject: [ci skip] Add missing periods and update link name and some wording. --- guides/source/active_record_basics.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'guides/source/active_record_basics.md') diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index ad08cb01f7..34baae509b 100644 --- a/guides/source/active_record_basics.md +++ b/guides/source/active_record_basics.md @@ -48,10 +48,10 @@ overall database access code. Active Record gives us several mechanisms, the most important being the ability to: -* Represent models and their data -* Represent associations between these models -* Represent inheritance hierarchies through related models -* Validate models before they get persisted to the database +* Represent models and their data. +* Represent associations between these models. +* Represent inheritance hierarchies through related models. +* Validate models before they get persisted to the database. * Perform database operations in an object-oriented fashion. Convention over Configuration in Active Record @@ -78,9 +78,9 @@ of two or more words, the model class name should follow the Ruby conventions, using the CamelCase form, while the table name must contain the words separated by underscores. Examples: -* Database Table - Plural with underscores separating words (e.g., `book_clubs`) +* Database Table - Plural with underscores separating words (e.g., `book_clubs`). * Model Class - Singular with the first letter of each word capitalized (e.g., -`BookClub`) +`BookClub`). | Model / Class | Table / Schema | | ------------- | -------------- | @@ -101,7 +101,7 @@ depending on the purpose of these columns. fields that Active Record will look for when you create associations between your models. * **Primary keys** - By default, Active Record will use an integer column named - `id` as the table's primary key. When using [Rails + `id` as the table's primary key. When using [Active Record Migrations](migrations.html) to create your tables, this column will be automatically created. @@ -116,7 +116,7 @@ to Active Record instances: locking](http://api.rubyonrails.org/classes/ActiveRecord/Locking.html) to a model. * `type` - Specifies that the model uses [Single Table - Inheritance](http://api.rubyonrails.org/classes/ActiveRecord/Base.html) + Inheritance](http://api.rubyonrails.org/classes/ActiveRecord/Base.html). * `(association_name)_type` - Stores the type for [polymorphic associations](association_basics.html#polymorphic-associations). * `(table_name)_count` - Used to cache the number of belonging objects on @@ -368,6 +368,6 @@ Rails keeps track of which files have been committed to the database and provides rollback features. To actually create the table, you'd run `rake db:migrate` and to roll it back, `rake db:rollback`. -Note that the above code is database-agnostic: it will run in MySQL, postgresql, -Oracle and others. You can learn more about migrations in the [Active Record -Migrations guide](migrations.html) +Note that the above code is database-agnostic: it will run in MySQL, +PostgreSQL, Oracle and others. You can learn more about migrations in the +[Active Record Migrations guide](migrations.html). -- cgit v1.2.3 From ce46f20d13ca1b45dfd499c359ee8bce7abce1ae Mon Sep 17 00:00:00 2001 From: Malav Bhavsar Date: Thu, 10 Oct 2013 01:56:42 -0700 Subject: Some fixes in docs [ci skip] Update a link to point to right section in api docs Fix a typo --- guides/source/active_record_basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/active_record_basics.md') diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index 34baae509b..a184f0753d 100644 --- a/guides/source/active_record_basics.md +++ b/guides/source/active_record_basics.md @@ -116,7 +116,7 @@ to Active Record instances: locking](http://api.rubyonrails.org/classes/ActiveRecord/Locking.html) to a model. * `type` - Specifies that the model uses [Single Table - Inheritance](http://api.rubyonrails.org/classes/ActiveRecord/Base.html). + Inheritance](http://api.rubyonrails.org/classes/ActiveRecord/Base.html#label-Single+table+inheritance). * `(association_name)_type` - Stores the type for [polymorphic associations](association_basics.html#polymorphic-associations). * `(table_name)_count` - Used to cache the number of belonging objects on -- cgit v1.2.3