Allows you to check if an attribute has changed to a particular value

model.name_changed?(from: "Pete", to: "Ringo")
[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
Allow "url" sub key in database.yml configuration

Currently a developer can pass in a YAML configuration that fully specifies connection information:

```
production:
  database: triage_production
  adapter: password
  pool: 5
```

They can also pass in a string that specifies a connection URL directly to an environment key:

```
production: postgresql://localhost/foo
```

This PR allows the use of both a connection url and specifying connection attributes via YAML through the use of the "url" sub key:

```
production:
  url: postgresql://localhost/foo
  pool: 3
```

This will allow developers to inherit Active Record options such as `pool` from `&defaults` and still use a secure connection url such as `<%= ENV['DATABASE_URL'] %>`. The URL is expanded into a hash and then merged back into the YAML hash. If there are any conflicts, the values from the connection URL are preferred. 

Talked this over with @josevalim
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
Merge pull request #13541 from schneems/schneems/db-url-sub-key

Allow "url" sub key in database.yml configuration
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 #13131 from gja/changed-accepts-values

Allows you to check if a field has changed to a particular value
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';