Update Active Record's attribute query methods documentation to describe its full behaviour. [ci skip]
Clarify that the word present refers to Object#present?. [ci skip]

Update Active Record's attribute query methods documentation to clarify that whether an attribute is present is based on Object#present?. This gives people a place to go see what the exact definition of presence is. [ci skip]
Remove unneeded special case to calculate size for has_many :through

All cases are properly handled in CollectionAssociation
for all subclasses of this association
Merge pull request #18174 from bogdan/cleanup_has_many_though_association_count

Remove unneeded special case to calculate size for has_many :through
proof of concept, need to check in GitHub
second test to warn against reading guides in GitHub
third test to warn against reading guides in GitHub
warn about reading guides in GitHub

References #18148.
removes superfluous regexp group
Clarify that query methods have a custom definition of whether a numeric value is present. [ci skip]

The way Active Record query methods handle numeric values is a special case, and is not part of Rails's standard definition of present. This update attempts to make this more clear in the docs, so that people don't expect Object#present? to return false if used on a number that is zero.
Merge pull request #18159 from M7/docs-active_record-update_query_method_docs_with_full_description

Describe full behaviour of Active Record's attribute query methods
Move transaction callbacks config into initializer

Stems from comment by @dhh: https://github.com/rails/rails/pull/17227#commitcomment-9079727:

> I'd like for the option to be put in an initializer instead, though.
> It's not worthy of such high promise as the application.rb.

Style-wise, I am always adding the new initializer file to a Rails app, even
when the app is created with `--skip-active-record`. In this case, the line of
code in the initializer is commented out.

I think this is better than **skipping** the initializer and is more coherent
with the other initializers. Is that okay? :christmas_tree: