Cleanup loaded features and constants after dependency tests.
Explicit route test class

shows the class that the test must extend in order to have the assert_routing method available
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.
```
Allow authentication header to not have to specify 'token=' key.

Fixes: https://github.com/rails/rails/issues/17108.
If Rails is not defined, check ENV["RAILS_ENV"] and ENV["RACK_ENV"].

This fixes a regression introduced by 6cc03675d30b58e28f585720dad14e947a57ff5b.

ActiveRecord, if used without Rails, always checks the "default_env" environment. This would be OK, except that Sinatra also supports environments,
and it runs with {RACK|RAILS}_ENV=production. This patch adds a fallback to RAILS_ENV and RACK_ENV (and ultimately default_env) if Rails.env doesn't exist.
copy reflection_scopes’s unscoped value when building scope for preloading, fixes #11036
[ci skip] Add missing blank line to AR validation.
[ci skip] No need to indent here (AC overview).
[ci skip] Add highlight to code (form helper guide).
Make `String#remove` and `String#remove!` accept multiple arguments
Do not package the guides output

Fixes #17455
Don't require calculations to be aliased to a column

Arel has changed so that `.sum` no longer aliases `SUM(the_column)` to
`sum_id`. This means the type returned by the adapter will be at the key
`"SUM(the_column)"`. Longer term, we should eventually be able to retain
type information from the AR::Base subclasses used in joined queries
Rename `default_attributes` to `_default_attributes`

It is internal use only. This is to avoid conflicting with users' method
names. Fixes #17458
Add masked authenticity token section, details on finder options, misc typos [ci skip]
Merge pull request #17460 from hbriggs/master

Masked authenticity token section, finder options details, misc typos [ci skip]
Treat strings greater than int max value as out of range

Sufficiently large integers cause `find` and `find_by` to raise
`StatementInvalid` instead of `RecordNotFound` or just returning `nil`.
Given that we can't cast to `nil` for `Integer` like we would with junk
data for other types, we raise a `RangeError` instead, and rescue in
places where it would be highly unexpected to get an exception from
casting.

Fixes #17380
Merge pull request #17459 from sgrif/sg-find-by-large-numbers

Treat strings greater than int max value as out of range
Honor public/private in ActionView::Helpers::Tags::Base#value

* use public_send instead of send to avoid calling private
  methods in form helpers
Use public_send for form tags
Improve test of private properties of objects in form tags