Fix includes on association with a scope containing joins along with conditions
on the joined assoiciation
Move test that depends on ActiveRecord

This commit moves a test from `test/template` to `test/activerecord` since the
test depends on ActiveRecord.

This matches the documentation from [RUNNING_UNIT_TESTS](https://github.com/rails/rails/blob/f28d1ddd507174ac233b773cc4f35c3c05ad32e7/actionview/RUNNING_UNIT_TESTS.rdoc):

> Test cases in the test/activerecord/ directory depend on having activerecord and sqlite3 installed.
> If Active Record is not in actionview/../activerecord directory, or the sqlite3 rubygem is not installed, these tests are skipped.
> Other tests are runnable from a fresh copy of actionview without any configuration.

---

More details about this commit.

All the tests starting with `require 'active_record_unit'` are already
inside `test/activerecord`, except for the one test this commit moves.

If you don't have `active_record` on your machine, the following command
currently fails on master:

```bash
```
[ci skip] correct example output and filename in pg guide
Merge pull request #17712 from y-yagi/correct_postgres_guide

[ci skip] correct example output and filename in pg guide
Fixing wrong link in 'Ruby on Rails Security Guide' [ci skip]

The URL

http://www.h-online.com/security/Symantec-reports-first-active-attack-on-a-DSL-router--/news/102352

points to an article titled 'The H is closing down'. The good one is:

http://www.h-online.com/security/news/item/Symantec-reports-first-active-attack-on-a-DSL-router-735883.html
Merge pull request #17716 from javiervidal/fixing_documentation

Fixing wrong link in 'Ruby on Rails Security Guide' [ci skip]
Remove outdated comments [ci skip]

They were introduced in 23b6def; the serial stuff has been removed since a5d80f8
Rename the primary key index when renaming a table in pg

Also checked to make sure this does not affect foreign key constraints.
(It doesn't).

Fixes #12856
Closes #14088
Fix build failures

For some reason changing `.find` to `.unscoped.find` in
https://github.com/rails/rails/commit/f766abd4cf3eb75469d3646cfb6d85e668c619f3
caused `scoping` to leak in some tests when run in isolation (looks like
a concurrency issue?). `relation_scoping_test.rb` is a case that failed.
From what I can tell it should not be possible, but changing to the
block form fixes it. There is a deeper issue that I can't seem to find.
/cc @senny
Anchor should not be appended when set to nil/false.

Fixes https://github.com/rails/rails/issues/17714.
Add changelog entry for .reflections API change

`.reflections` public API changed to return a String instead of a Symbol
as keys.

see commit 1f31488499111fdfce79d8dc1cc8fb008f7cdb25 and 6259e4e2dcca9a79f22f96658c33efe81936bc0d

[fixes #16928]
[fixes #17610]
Update reflections public API doc
Merge pull request #17718 from arthurnn/fixes_16928

Fixes 16928, improve reflections public API doc [ci skip]
Fix explanation for ActionDispatch::Callbacks.

ActionDispatch::Callbacks dose not run the prepare callbacks,
so change with comment on ActionDispatch::Callbacks.
Merge pull request #17719 from yui-knk/fix/rails_on_rack_guide

Fix explanation for ActionDispatch::Callbacks. [ci skip]
[ci skip] Dispatching is a verb :bow:

cc #17719
[ci skip] Fix class name of middleware.
[ci skip] Fix comment of ActionDispatch::Callbacks

cc ddce3dd
Merge pull request #17722 from yui-knk/fix/callbacks_comment

[ci skip] Fix comment of ActionDispatch::Callbacks
Specified beta branch for web-console gem