aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activejob/lib/active_job/queue_adapters.rb26
-rw-r--r--guides/source/association_basics.md7
2 files changed, 21 insertions, 12 deletions
diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb
index 46caa5c6a5..8aa85979f6 100644
--- a/activejob/lib/active_job/queue_adapters.rb
+++ b/activejob/lib/active_job/queue_adapters.rb
@@ -37,7 +37,8 @@ module ActiveJob
#
# ==== Queues
#
- # Yes: Jobs may set which queue they are run in with queue_as or by using the set method.
+ # Yes: Jobs may set which queue they are run in with queue_as or by using the set
+ # method.
#
# ==== Delayed
#
@@ -56,13 +57,17 @@ module ActiveJob
#
# ==== Priorities
#
- # The order in which jobs are processed can be configured differently depending on the adapter.
+ # The order in which jobs are processed can be configured differently depending
+ # on the adapter.
#
- # Job: Any class inheriting from the adapter may set the priority on the job object relative to other jobs.
+ # Job: Any class inheriting from the adapter may set the priority on the job
+ # object relative to other jobs.
#
- # Queue: The adapter can set the priority for job queues, when setting a queue with Active Job this will be respected.
+ # Queue: The adapter can set the priority for job queues, when setting a queue
+ # with Active Job this will be respected.
#
- # Yes: Allows the priority to be set on the job object, at the queue level or as default configuration option.
+ # Yes: Allows the priority to be set on the job object, at the queue level or
+ # as default configuration option.
#
# No: Does not allow the priority of jobs to be configured.
#
@@ -78,18 +83,21 @@ module ActiveJob
#
# Global: The adapter is configured that all jobs have a maximum run time.
#
- # N/A: This adapter does not run in a separate process, and therefore timeout is unsupported.
+ # N/A: This adapter does not run in a separate process, and therefore timeout
+ # is unsupported.
#
# ==== Retries
#
# Job: The number of retries can be set per instance of the job class.
#
- # Yes: The Number of retries can be configured globally, for each instance or on the queue.
- # This adapter may also present failed instances of the job class that can be restarted.
+ # Yes: The Number of retries can be configured globally, for each instance or
+ # on the queue. This adapter may also present failed instances of the job class
+ # that can be restarted.
#
# Global: The adapter has a global number of retries.
#
- # N/A: The adapter does not run in a separate process, and therefore doesn't support retries.
+ # N/A: The adapter does not run in a separate process, and therefore doesn't
+ # support retries.
module QueueAdapters
extend ActiveSupport::Autoload
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index d215d8b30f..8b6d70f1ad 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -916,8 +916,8 @@ TIP: In any case, Rails will not create foreign key columns for you. You need to
##### `:primary_key`
-By convention, Rails assumes that the `id` column is used to hold the primary key of it's table.
-The `:primary_key` option allows you to specify a different column.
+By convention, Rails assumes that the `id` column is used to hold the primary key
+of its tables. The `:primary_key` option allows you to specify a different column.
For example, given we have a `users` table with `guid` as the primary key. If we want a separate `todos` table to hold the foreign key `user_id` in the `guid` column, then we can use `primary_key` to achieve this like so:
@@ -931,7 +931,8 @@ class Todo < ActiveRecord::Base
end
```
-When we execute `@user.todos.create` then the `@todo` record will have `user_id` value as the `guid` value of `@user`.
+When we execute `@user.todos.create` then the `@todo` record will have its
+`user_id` value as the `guid` value of `@user`.
##### `:inverse_of`