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
copy edits [ci skip]
fix formatting errors [ci skip]
[ci skip] doc Http::Headers methods
[ci skip] doc ActiveSupport::TimeWithZone#to_s

Current docs are wrong. Does not accept strftime inputs.
test, regression test for has_many with instance dependent scope.
Documentation, add examples of using an Enum scope

When scanning the Enum API page I found it easy to miss that scopes are generated.  Adding an example clarifies use and has more... *pop*...
Merge pull request #15045 from xanhast/patch-1

Documentation, add examples of using an Enum scope [ci skip]
use unless and || since these options are boolean
use fnmatch to test for case insensitive file systems

this is due to:

  https://bugs.ruby-lang.org/issues/5994
[ci skip] add example to AR#assign_attributes
don't mutate the options hash, so we don't have to dup

avoids extra hash allocations on each call
skip dealing with params if none are provided

This lets us avoid

1. A slow call to Hash#slice
2. An is_a? test
3. Extra hash allocations (from slice)
4. String allocations

etc.
Fix broken proc syntax for 1.9.3
Merge pull request #15049 from arthurnn/fix_ci

Fix broken proc syntax for 1.9.3
deprecate, join, preload, eager load of instance dependent associations.

Closes #15024.

These operations happen before instances are created.
The current behavior is misleading and can result in broken behavior.
copy edits [ci skip]