Add a note on custom validation contexts.

The documentation on `:on` for validations was inconsistent, and most
only referenced the `:create` and `:update` contexts. I fixed those to
be consistent with the documentation on `AM::Validations.validates`,
which seemed to have the best docs.

[ci skip]
[ci skip] add guide for ActiveModel::SecurePassword
Use #tr instead of #gsub where possible
Fix typo
Merge pull request #17168 from jwworth/task/fix_typo

Fix typo [ci skip]
fix typo in in define_model_callbacks comment [ci skip]
Merge pull request #17172 from rselk/typo

fix typo in in define_model_callbacks comment [ci skip]
Fix underscore inflector handling of adjacent acronyms

I suspect that positive lookbehind would have been used in the
original implementation had it been available in supported Ruby
versions at the time. Now that Rails requires Ruby 1.9.2 or above,
this is no longer an issue.

This fixes #14146 for acronyms such as APIRESTful. This technique also
addresses namespaced acronyms that are not entirely uppercased. This
was broken when the commit was originally written but has since been
fixed in ccbb481. The latter does not deal with adjacent acronyms so
this commit wins.
Merge pull request #17150 from effektz/tr-instead-of-gsub

Use #tr instead of #gsub where possible
Merge pull request #14146 from chewi/fix-underscore-acronyms-regex

Fix underscore inflector handling of namespaced and adjacent acronyms
:heart: 1.9
Merge pull request #16409 from justinweiss/update_validation_context_documentation

Docs: Add a note on custom validation contexts. [ci skip]
Clarify possible validations you can use to avoid a NULL boolean value
in the database. Closes #16304 [ci skip]
doc added for `writer` method in `alias_method_chain`[ci skip]
[ci skip] Clarify deletion strategies for collection proxies

For detailed testing of behavior see:
https://gist.github.com/eileencodes/5b0a2fe011dcff6203fe

This shows destroy_all always destroys records and fires callbacks.
It will never use nullify or delete_all

delete_all's behavior varies greatly based on `hm` vs `hm:t` and deletion
strategy.
Merge pull request #17176 from kuldeepaggarwal/doc-alias_method_chain

doc added for `writer` method in `alias_method_chain` [ci skip]
Merge pull request #17179 from eileencodes/clarify-delete-strategies-on-collection-proxy

[ci skip] Clarify deletion strategies for collection proxies
Add Active Model to guides [ci skip]
Edits to ActiveModel guide [ci skip]

- Some grammatical errors and rewording of sentences throughout document

- Renaming headers to be more human readable, and if following paragraphs do not include module
  names, adding those in

- In ActiveModel::AttributeMethods
  * formatting expected output correctly, changing from `#` to `# =>`

- In ActiveModel::Dirty
  * changing expected output of person.first_name_was from "First Name" to nil
  * removing 'active_model' requirement at top of code snippet

- In ActiveModel::Validations
  * originally Person.new(token: "2b1f325") raises an argument error (1 for 0), so setting of
    attribute occurs on the line after object instantiation

- In ActiveModel::Naming
  * closing code snippet tag at end of section so ActiveModel::Model is a separate section

- In ActiveModel::Model
  * fixing spelling mistake of attr_accessor

- In ActiveModel::Serialization
  * adding edit to description of how from_json and from_xml works under serialization

- In ActiveModel::Lint::Tests
  * capitalizing person for class name
[ci skip] Merge ActiveModel::SecurePassword guide from @aditya-kapoor

Merge branch 'active-model-secure-password-guide' of https://github.com/aditya-kapoor/rails into aditya-kapoor-active-model-secure-password-guide

Conflicts:
	guides/source/active_model_basics.md