aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/migrations.md20
-rw-r--r--guides/source/rails_on_rack.md3
-rw-r--r--guides/source/testing.md4
3 files changed, 12 insertions, 15 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md
index 194ae276ec..eb0cfd9451 100644
--- a/guides/source/migrations.md
+++ b/guides/source/migrations.md
@@ -366,26 +366,24 @@ create_join_table :products, :categories
which creates a `categories_products` table with two columns called
`category_id` and `product_id`. These columns have the option `:null` set to
-`false` by default.
-
-You can pass the option `:table_name` with you want to customize the table
-name. For example,
+`false` by default. This can be overridden by specifying the `:column_options`
+option.
```ruby
-create_join_table :products, :categories, table_name: :categorization
+create_join_table :products, :categories, column_options: {null: true}
```
-will create a `categorization` table.
+will create the `product_id` and `category_id` with the `:null` option as
+`true`.
-For the two table columns, you can override the default `:null` option, or add
-others, by specifying the `:column_options` option. For example,
+You can pass the option `:table_name` with you want to customize the table
+name. For example,
```ruby
-create_join_table :products, :categories, column_options: {null: true}
+create_join_table :products, :categories, table_name: :categorization
```
-will create the `product_id` and `category_id` with the `:null` option as
-`true`.
+will create a `categorization` table.
`create_join_table` also accepts a block, which you can use to add indices
(which are not created by default) or additional columns:
diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md
index 2f36e4b8ac..d144fba762 100644
--- a/guides/source/rails_on_rack.md
+++ b/guides/source/rails_on_rack.md
@@ -273,10 +273,9 @@ Much of Action Controller's functionality is implemented as Middlewares. The fol
* Runs the prepare callbacks before serving the request.
-
**`ActiveRecord::Migration::CheckPending`**
-* Checks pending migrations and raise an error if migrations are pending.
+* Checks pending migrations and raises `ActiveRecord::PendingMigrationError` if any migrations are pending.
**`ActiveRecord::ConnectionAdapters::ConnectionManagement`**
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 95d454ba9d..416a8b592f 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -767,8 +767,8 @@ Rake Tasks for Running your Tests
You don't need to set up and run your tests by hand on a test-by-test basis. Rails comes with a number of commands to help in testing. The table below lists all commands that come along in the default Rakefile when you initiate a Rails project.
-| Tasks | Description |
-| ------------------------ | ----------- |
+| Tasks | Description |
+| ----------------------- | ----------- |
| `rake test` | Runs all unit, functional and integration tests. You can also simply run `rake test` as Rails will run all the tests by default|
| `rake test:controllers` | Runs all the controller tests from `test/controllers`|
| `rake test:functionals` | Runs all the functional tests from `test/controllers`, `test/mailers`, and `test/functional`|