fixing mailer previews for apps with globbing route
Test coverage for ActiveJob generator
Make error message clearer that :on requires a symbol, not a string

The validation added in 5a3dc8092d19c816b0b1203945639cb91d065847 will
reject values for the `:on` option for after_commit and after_rollback
callbacks that are string values like `"create"`.

However, the error message says ":on conditions for after_commit and
after_rollback callbacks have to be one of create,destroy,update". That
looks like a string value *would* be valid.

This commit changes the error message to say ":on conditions for
after_commit and after_rollback callbacks have to be one of [:create,
:destroy, :update]", making it clearer that symbols are required.
Add note to Store about uniqueness validation (#17954) [skip ci]
Merge pull request #17953 from kirs/test-activejob-generator

Test coverage for ActiveJob generator
Merge pull request #17966 from mikechau/update-ar-store-validation-documentation

Add note to Store about uniqueness validation (#17954) [skip ci]
Fix type case of "validations" and word-wrap from #17954 [ci skip]
add brackets around attribute_name

since 'attr_name_will_change!' is not an actual method it should
be clearer that you have to insert the attribute name as in line 104

[ci skip]
Merge pull request #17969 from tiii/add-brackets-around-attribute_name

add brackets around attribute_name [ci skip]
Merge pull request #17896 from GBH/globbing_route_mailer_preview

fixing mailer previews for apps with globbing route
Merge pull request #17964 from carols10cents/improve-after-commit-argumenterror-message

Make error message clearer that :on requires a symbol, not a string
Only check that it is a Rails application once

Also avoid using try since is_a? is faster for this case.
Revert to 4.1 behavior for casting PG arrays

The user is able to pass PG string literals in 4.1, and have it
converted to an array. This is also possible in 4.2, but it would remain
in string form until saving and reloading, which breaks our
`attr = save.reload.attr` contract. I think we should deprecate this in
5.0, and only allow array input from user sources. However, this
currently constitutes a breaking change to public API that did not go
through a deprecation cycle.
Don't error when `attributes` is called on a frozen AR model

`freeze` will ultimately end up freezing the `AttributeSet`, which in
turn freezes its `@attributes` hash. However, we actually insert a
special object to lazily instantiate the values of the hash on demand.
When it does need to actually instantiate all of them for iteration (the
only case is `ActiveRecord::Base#attributes`, which calls
`AttributeSet#to_h`), it will set an instance variable as a performance
optimization

Since it's just an optimization for subsequent calls, and that method
being called at all is a very uncommon case, we can just leave the ivar
alone if we're frozen, as opposed to coming up with some overly
complicated mechanism for freezing which allows us to continue to modify
ourselves.

Fixes #17960
Allow custom handling of non-standard types in `time_zone_conversion`

PostgreSQL for example, allows infinity as a valid value for date time
columns. The PG type has explicit handling for that case. However, time
zone conversion will end up trampling that handling. Unfortunately, we
can't call super and then convert time zones.

However, if we get back nil from `.in_time_zone`, it's something we
didn't expect so we can let the superclass handle it.

Fixes #17971
Update test case for TZ aware attributes

The test added in 42418cfc94d1356d35d28d786f63e7fab9406ad6 wasn't
actually testing anything, since the bug was with TZ aware attributes
only.
Throw :abort halts default CallbackChains

This commit changes arguments and default value of CallbackChain's :terminator
option.

After this commit, Chains of callbacks defined **without** an explicit
`:terminator` option will be halted as soon as a `before_` callback throws
`:abort`.

Chains of callbacks defined **with** a `:terminator` option will maintain their
existing behavior of halting as soon as a `before_` callback matches the
terminator's expectation. For instance, ActiveModel's callbacks will still
halt the chain when a `before_` callback returns `false`.
Deprecate `false` as the way to halt AM validation callbacks

Before this commit, returning `false` in an ActiveModel validation
callback such as `before_validation` would halt the callback chain.

After this commit, the behavior is deprecated: will still work until
the next release of Rails but will also display a deprecation warning.

The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
Deprecate `false` as the way to halt AM callbacks

Before this commit, returning `false` in an ActiveModel `before_` callback
such as `before_create` would halt the callback chain.

After this commit, the behavior is deprecated: will still work until
the next release of Rails but will also display a deprecation warning.

The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
Deprecate `false` as the way to halt AR callbacks

Before this commit, returning `false` in an ActiveRecord `before_` callback
such as `before_create` would halt the callback chain.

After this commit, the behavior is deprecated: will still work until
the next release of Rails but will also display a deprecation warning.

The preferred way to halt a callback chain is to explicitly `throw(:abort)`.