Skip to content

Commit 8ad19d9

Browse files
Minor tweaks / improvements to recent changelog/api docs [ci skip]
1 parent 4939f39 commit 8ad19d9

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

actioncable/CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
* Record ping on every actioncable message
1+
* Record ping on every Action Cable message.
22

3-
Previously only `ping` and `welcome` message types were keeping connection active.
4-
Now every Action Cable message updates `pingedAt` value preventing connection from being marked as stale.
3+
Previously only `ping` and `welcome` message types were keeping the connection active.
4+
Now every Action Cable message updates the `pingedAt` value, preventing the connection
5+
from being marked as stale.
56

67
*yauhenininjia*
78

8-
* Add two new assertion methods for ActionCable test cases: `assert_has_no_stream`
9+
* Add two new assertion methods for Action Cable test cases: `assert_has_no_stream`
910
and `assert_has_no_stream_for`. These methods can be used to assert that a
1011
stream has been stopped, e.g. via `stop_stream` or `stop_stream_for`. They complement
1112
the already existing `assert_has_stream` and `assert_has_stream_for` methods.

activejob/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A common mistake with Active Job is to enqueue jobs from inside a transaction,
44
causing them to potentially be picked and ran by another process, before the
5-
transaction is committed, which result in various errors.
5+
transaction is committed, which may result in various errors.
66

77
```ruby
88
Topic.transaction do

activejob/lib/active_job/enqueue_after_transaction_commit.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ module EnqueueAfterTransactionCommit # :nodoc:
99
# :singleton-method:
1010
#
1111
# Defines if enqueueing this job from inside an Active Record transaction
12-
# automatically defers the enqueue to after the transaction commit.
12+
# automatically defers the enqueue to after the transaction commits.
1313
#
1414
# It can be set on a per job basis:
1515
# - `:always` forces the job to be deferred.
16-
# - `:never` forces the job to be queueed immediately
17-
# - `:default` let the queue adapter define the behavior (recommended).
16+
# - `:never` forces the job to be queued immediately.
17+
# - `:default` lets the queue adapter define the behavior (recommended).
1818
class_attribute :enqueue_after_transaction_commit, instance_accessor: false, instance_predicate: false, default: :never
1919

2020
around_enqueue do |job, block|

activejob/lib/active_job/enqueuing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module ClassMethods
5555
# After the attempted enqueue, the job will be yielded to an optional block.
5656
#
5757
# If Active Job is used conjointly with Active Record, and #perform_later is called
58-
# inside an Active Record transaction, then the enqueue is implictly defered to after
58+
# inside an Active Record transaction, then the enqueue is implicitly deferred to after
5959
# the transaction is committed, or droped if it's rolled back. This behavior can
6060
# be changed on a per job basis:
6161
#

activejob/lib/active_job/queue_adapters/abstract_adapter.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ module QueueAdapters
55
# = Active Job Abstract Adapter
66
#
77
# Active Job supports multiple job queue systems. ActiveJob::QueueAdapters::AbstractAdapter
8-
# form the abstraction layer which makes this possible.
8+
# forms the abstraction layer which makes this possible.
99
class AbstractAdapter
10-
# Define whether enqueuing should implictly to after commit when called from
11-
# inside a transaction. Most adapters should return true, but some adapters
10+
# Defines whether enqueuing should happen implicitly to after commit when called
11+
# from inside a transaction. Most adapters should return true, but some adapters
1212
# that use the same database as Active Record and are transaction aware can return
13-
# false to continue enqueuing jobs are part of the transaction.
13+
# false to continue enqueuing jobs as part of the transaction.
1414
def enqueue_after_transaction_commit?
1515
true
1616
end

activerecord/lib/active_record/transaction.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize # :nodoc:
2929
#
3030
# If there is no currently open transactions, the block is called immediately.
3131
#
32-
# If the current transaction has a parent transaction, the callback is transfered to
32+
# If the current transaction has a parent transaction, the callback is transferred to
3333
# the parent when the current transaction commits, or dropped when the current transaction
3434
# is rolled back. This operation is repeated until the outermost transaction is reached.
3535
def before_commit(&block)
@@ -40,7 +40,7 @@ def before_commit(&block)
4040
#
4141
# If there is no currently open transactions, the block is called immediately.
4242
#
43-
# If the current transaction has a parent transaction, the callback is transfered to
43+
# If the current transaction has a parent transaction, the callback is transferred to
4444
# the parent when the current transaction commits, or dropped when the current transaction
4545
# is rolled back. This operation is repeated until the outermost transaction is reached.
4646
def after_commit(&block)

0 commit comments

Comments
 (0)