Added test to ensure that DescendantsTracker does not leak memory on singleton classes
DirtyModel uses a hash to keep track of any changes made to attributes
of an instance. When using the attribute_will_change! method, you must
supply a string and not a symbol or the *_changed? method will break
(because it is looking for the attribute name as a string in the keys
of the underlying hash). To remedy this, I simply made the underlying
hash a HashWithIndifferentAccess so it won't matter if you supply
the attribute name as a symbol or string to attribute_will_change!.
make sure both headers are set before checking for ip spoofing
add active model basics wip to guides/documents.yaml
Remove sqlite specific`supports_autoincrement?` which always defaults to true
Add params option for button_to

The parameters are rendered as hidden form fields within the generated
form. This is useful for when a record has multiple buttons associated
with it, each of which target the same controller method, but which
need to submit different attributes.
Strong parameters should permit nested number as key. Closes #12293
Fixed issue #12327
Migrations Guide: Add semicolon to sentences before code block [ci skip]
Removed where_values_hash from AR::NullRelation

In order to build associated records for owners which has not been saved
need to get where values to use as default attributes.
But for new record owner uses `ActiveRecord::NullRelation` which
override `where_values_hash` to return empty hash stub.

`where_values_hash` is not used to invoke any sql query, but good to
build others chains (even will be never executed) like:

```ruby
  post          = Post.new
  admin_comment = post.admin_comments.build

  assert_equal 'Admin', admin_comment.author
```

Closes #11376, #11676, #11675
Cleanup identitymap logger from LogSubscriber

Also renaming ivar @odd_or_even to @odd
Replace global Hash with TS::Cache.
Use TS::Cache instead of Mutex + Hash.

TS::Cache#compute_if_absent guarantees that only a single thread will get to execute the provided block for a given key.
Make GTG::TransTable thread safe.

From now on only the `[]=` method is allowed to modify the internal states hashes.
Merge pull request #12396 from arthurnn/cleanup_logsubs

Cleanup identitymap logger from LogSubscriber
Merge pull request #11496 from jetthoughts/11376_has_many_assoc_respect_scope_on_build

Removed where_values_hash from AR::NullRelation
Merge pull request #12398 from thedarkone/thread-safety-stuff

Thread safety fixes
Merge pull request #12387 from francisgo/patch-9

Migrations Guide: Add semicolon to sentences before code block [ci skip]
Merge pull request #12354 from kennyj/fix_12293

Closes #12293. Strong parameters should permit nested number as key.
fixes incorrect spelling of `action_on_unpermitted_parameters`

See `actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb`