Refactor AR's validations_test.rb

The `:context` switch feature is implemented in
ActiveRecord::Validations#valid? method, so we should rename the test
names, and execute `valid?` in the test.

Change test name in AR's validations_test.rb

This test is testing save method's code
Fix Formatting in AR Readme

Don't make free form text appear in code blocks [ci skip]
[ci skip] document type_cast_for_write
[ci skip] document ActionDispatch::HTTP::Headers
Branch name should match in text and code example.

[ci skip]
Merge pull request #15020 from ivantsepp/contributing_to_rails_guide_fix

Mismatch branch name between text and code example [ci skip]
Fixed HABTM's CollectionAssociation size

HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded.

This addresses both #14913 and #14914 for master.
pg guide, inet code example. [ci skip]
test, reset changed state in PG's uuid tests.

This resulted in some unrelated errors on Traivs:

  1) Error:
PostgresqlUUIDTest#test_treat_blank_uuid_as_nil:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "thingy" of relation "uuid_data_type" does not exist
LINE 1: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNIN...
                                      ^
: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNING "id"

/cc @zuhao
Merge pull request #14992 from fredwu/habtm_relation_size_calculation_fix

Habtm relation size calculation fix. Fixes #14913, Fixes #14914.
test, regression test for unparsable PostgreSQL defaults.

This test was inspired by #14866. That PR would break this
functionality and we should make sure we notice that in the future.
set a constant for the "anonymous" habtm model fixes #15022

I wanted the middle model to be anonymous, but we have to give it a name
for marshal support. :'(
add more tests around the polymorphic url api
copy edits [ci skip]
fix formatting errors [ci skip]
[ci skip] Minor improvements on routing.md.
Merge pull request #15029 from JuanitoFatas/docpatch/routing

[ci skip] Minor improvements on routing.md.
Change 'a' to 'an' [ci skip]
Merge pull request #15030 from mechanicles/a-to-an

Change 'a' to 'an' [ci skip]
add tests for the polymorphic_path method