aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_basics.md
diff options
context:
space:
mode:
authorAnthony Crumley <anthony.crumley@gmail.com>2018-05-08 21:48:07 -0500
committerAnthony Crumley <anthony.crumley@gmail.com>2018-05-10 12:46:06 -0500
commit258670244dae39616a50ec1116f52e91b6f0bc62 (patch)
tree6bb7d09613c9f8df3ec5e8e6661d338fde1b3153 /guides/source/active_record_basics.md
parent2161b78336bb9c2b169063c22af10485ff9a93e7 (diff)
downloadrails-258670244dae39616a50ec1116f52e91b6f0bc62.tar.gz
rails-258670244dae39616a50ec1116f52e91b6f0bc62.tar.bz2
rails-258670244dae39616a50ec1116f52e91b6f0bc62.zip
Added a lot of Oxford commas
[ci skip] A regular expression was used to find a lot of missing Oxford commas and add them. The regular expression was as follows. ", ([a-zA-Z0-9.\`:'\"]+ ){1,6}(or|and) "
Diffstat (limited to 'guides/source/active_record_basics.md')
-rw-r--r--guides/source/active_record_basics.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md
index 2f85b765a3..182bc865f0 100644
--- a/guides/source/active_record_basics.md
+++ b/guides/source/active_record_basics.md
@@ -13,7 +13,7 @@ After reading this guide, you will know:
* How to use Active Record models to manipulate data stored in a relational
database.
* Active Record schema naming conventions.
-* The concepts of database migrations, validations and callbacks.
+* The concepts of database migrations, validations, and callbacks.
--------------------------------------------------------------------------------
@@ -211,7 +211,7 @@ to allow an application to read and manipulate data stored within its tables.
### Create
-Active Record objects can be created from a hash, a block or have their
+Active Record objects can be created from a hash, a block, or have their
attributes manually set after creation. The `new` method will return a new
object while `create` will return the object and save it to the database.
@@ -324,7 +324,7 @@ Validations
Active Record allows you to validate the state of a model before it gets written
into the database. There are several methods that you can use to check your
models and validate that an attribute value is not empty, is unique and not
-already in the database, follows a specific format and many more.
+already in the database, follows a specific format, and many more.
Validation is a very important issue to consider when persisting to the database, so
the methods `save` and `update` take it into account when
@@ -353,7 +353,7 @@ Callbacks
Active Record callbacks allow you to attach code to certain events in the
life-cycle of your models. This enables you to add behavior to your models by
transparently executing code when those events occur, like when you create a new
-record, update it, destroy it and so on. You can learn more about callbacks in
+record, update it, destroy it, and so on. You can learn more about callbacks in
the [Active Record Callbacks guide](active_record_callbacks.html).
Migrations
@@ -387,5 +387,5 @@ provides rollback features. To actually create the table, you'd run `rails db:mi
and to roll it back, `rails 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
+PostgreSQL, Oracle, and others. You can learn more about migrations in the
[Active Record Migrations guide](active_record_migrations.html).