Merge pull request #17148 from mgenereu/patch-1

Disallow appended newlines when parsing as integer
Use #tr instead of #gsub where possible
[ci skip] add `test:jobs` task to testing guide
Fix style for rescue responses doc [ci skip]

 * Change 'Any ***s that are...' to 'Any *** that is...'
 * Fix style for default rescue_responses setting

This is a follow-up commit to:

 * https://github.com/rails/rails/pull/17076
 * https://github.com/yuki24/rails/commit/89b8836f2470c689f6b7d52cab3a418bb63aef26
Merge pull request #17151 from y-yagi/patch-1

[ci skip] add `test:jobs` task to testing guide
Merge pull request #17153 from yuki24/fix-doc-format-for-rescue-responses

[Railsguides] Fix style for rescue responses doc [ci skip]
Revert "Fix style for rescue responses doc [ci skip]"

Reason: There is a wrong newline, a typo, and the change
to singular is not good.

This reverts commit d76380cf1ccec7ffeff19827ae9b6d9b71327418.
minor fixes in the configuring guide [ci skip]
define hash on duration
Fix that a collection proxy could be cached before the save of the owner, resulting in an invalid proxy lacking the owner’s id.

Absent this fix calls like: owner.association.update_all to behave unexpectedly because they try to act on association objects where
owner_id is null.

more evidence here: https://gist.github.com/Empact/5865555
```
Active Record 3.2.13
-- create_table(:firms, {:force=>true})
   -> 0.1371s
-- create_table(:clients, {:force=>true})
   -> 0.0005s
1 clients. 1 expected.
1 clients updated. 1 expected.
```

```
Active Record 4.0.0
-- create_table(:firms, {:force=>true})
   -> 0.1606s
-- create_table(:clients, {:force=>true})
   -> 0.0004s
1 clients. 1 expected.
0 clients updated. 1 expected.
```
Merge pull request #17160 from lsylvester/duration-hash

define hash on duration
add notes for `define_model_callbacks` [ci skip]
Merge pull request #17167 from kuldeepaggarwal/doc-define_model_callbacks

add notes for `define_model_callbacks`
Fix typo
Merge pull request #17168 from jwworth/task/fix_typo

Fix typo [ci skip]
fix typo in in define_model_callbacks comment [ci skip]
Merge pull request #17172 from rselk/typo

fix typo in in define_model_callbacks comment [ci skip]
Fix underscore inflector handling of adjacent acronyms

I suspect that positive lookbehind would have been used in the
original implementation had it been available in supported Ruby
versions at the time. Now that Rails requires Ruby 1.9.2 or above,
this is no longer an issue.

This fixes #14146 for acronyms such as APIRESTful. This technique also
addresses namespaced acronyms that are not entirely uppercased. This
was broken when the commit was originally written but has since been
fixed in ccbb481. The latter does not deal with adjacent acronyms so
this commit wins.
Merge pull request #17150 from effektz/tr-instead-of-gsub

Use #tr instead of #gsub where possible
Merge pull request #14146 from chewi/fix-underscore-acronyms-regex

Fix underscore inflector handling of namespaced and adjacent acronyms