Prevent state leak.
Remove redundant code.
Move cleanup into teardown, delete obsolete code.
remove unnecessary substitution for space in ActionView::Helpers#debug
Add an option to skip installation of Turbolinks
Always update counter caches in memory when adding records

Before, calling `size` would only work if it skipped the cache, and
would return a different result from the cache, but only if:

- The association was previously loaded
- Or you called size previously
- But only if the size was 0 when you called it

This ensures that the counter is appropriately updated in memory.
Don't mess with `column_defaults` when optimistic locking is enabled
Don't save through records twice

If the through record gets created in an `after_create` hook that is
defined before the association is defined (therefore after its
`after_create` hook) get saved twice. This ensures that the through
records are created only once, regardless of the order of the hooks.
Don't include inheritance column in the through_scope_attributes
Add test cases for Migration#inverse_of
Merge pull request #15771 from sgrif/sg-stop-messing-with-column-defaults

Don't mess with `column_defaults` when optimistic locking is enabled
Use `column_defaults` in dirty for checking changed defaults

We no longer need to "init changed attributes" from the initializer,
either, as there is no longer a case where a given value would differ
from the default, but would not already be marked as changed.
Merge pull request #15775 from sgrif/sg-use-column-defaults-in-dirty

Use `column_defaults` in dirty for checking changed defaults
Don't assume that Hstore columns have always changed

HStore columns come back from the database separated by a comma and a
space, not just a comma. We need to mirror that behavior since we
compare the two values.

Also adds a regression test against JSON to ensure we don't have the
same bug there.
Merge pull request #15780 from sgrif/sg-dont-always-save-mutable-types

Don't assume that Hstore columns have always changed
[ci skip] fix doc for the Hash#assert_valid_keys
Fix documentation from #15669 [ci skip]
Move array database type casting to the Array type

The case where we have a column object, but don't have a type cast
method involves type casting the default value when changing the schema.
We get one of the column definition structs instead. That is a case that
I'm trying to remove overall, but in the short term, we can achieve the
same behavior without needing to pass the adapter to the array type by
creating a fake type that proxies to the adapter.
Don't type cast the default on the column

If we want to have type decorators mess with the attribute, but not the
column, we need to stop type casting on the column. Where possible, we
changed the tests to test the value of `column_defaults`, which is
public API. `Column#default` is not.
Merge pull request #15727 from aditya-kapoor/add-tests-for-migration

Add test cases for Migration#inverse_of