Changed ActiveRecord::Associations::CollectionProxy#select to take multiple arguments.

This makes the arguments the same as ActiveRecord::QueryMethods::select.
Maintain proleptic gregorian in Time#advance

Time#advance uses Time#to_date and Date#advance to calculate a new date.
The Date object returned by Time#to_date is constructed with the assumption
that the Time object represents a proleptic gregorian date, but it is
configured to observe the default julian calendar reform date (2299161j)
for purposes of calculating month, date and year:

  Time.new(1582, 10, 4).to_date.to_s           # => "1582-09-24"
  Time.new(1582, 10, 4).to_date.gregorian.to_s # => "1582-10-04"

This patch ensures that when the intermediate Date object is advanced
to yield a new Date object, that the Time object for return is contructed
with a proleptic gregorian month, date and year.
[ci skip] trailing documentation whitespace
Fix few typos and improve markup at some levels
Add any/all support for variants

Like `format.any`, you can do the same with variants.

It works for both inline:

    respond_to do |format|
      format.html.any   { render text: "any"   }
      format.html.phone { render text: "phone" }
    end

and block syntax:

    respond_to do |format|
      format.html do |variant|
        variant.any(:tablet, :phablet){ render text: "any" }
        variant.phone { render text: "phone" }
      end
    end
https://github.com/rails/rails/commit/2075f39d726cef361170218fd16421fc52bed5a8 introduced a regression in includes/preloades
by calling `read_attribute` on an association when preloading takes places, instead of using loaded records in `association.target`.

tl;dr

Records are not made properly available via `read_attribute` when preloding in simultaneous,
but value of `@loaded` is already set true, and records concatenated in `association.target` on an association object.
When `@loaded` is true we return an object of `AlreadyLoaded` in preload_for. In `AlreadyLoaded` to return preloaded
records we make wrong use of `read_attribute`, instead of `target` records.

The regression is fixed by making use of the loaded records in `association.target` when the preloading takes place.

Fixes #13437
Make outer joins on proper parent

Outer joins were being built on the root relation klass rather than the
one specified in the join dependency root
Merge pull request #13525 from huoxito/make-outer-joins-on-proper-parent

Make outer joins on proper parent
Merge branch 'master' of github.com:lifo/docrails
Use `Array#wrap` instead `Array()`

- since `Array()` calls `to_ary` or `to_a` on a subject
- the intent is to 'wrap' subject into an array
Merge pull request #13470 from strzalek/variants-all-any

Add any/all support for variants
add test case
Improve tests to use only public API
Merge remote-tracking branch 'origin/master'
Add the ability to nullify the `enum` column
Merge pull request #13419 from amrnt/nullize-enum

Add the ability to nullize the enum column
Update grant statement to address #13549
Change the inexistent database name to inexistent_activerecord_unittest
to make this grant statement described in the document works

GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to 'rails'@'localhost';
Fix comment syntax

The code syntax in the comment example is invalid
Allow engine root relative redirects using an empty string.

Example:

    # application routes.rb
    mount BlogEngine => '/blog'

    # engine routes.rb
    get '/welcome' => redirect('')

This now redirects to the path `/blog`, whereas before it would redirect
to the application root path. In the case of a path redirect or a custom
redirect if the path returned contains a host then the path is treated as
absolute. Similarly for option redirects, if the options hash returned
contains a `:host` or `:domain` key then the path is treated as absolute.

Fixes #7977