Merge pull request #15358 from arthurnn/redefine_habtm_fix

Fix redefine a has_and_belongs_to_many inside inherited class
Conflicts:
	activerecord/CHANGELOG.md
Fix the changelog task
Preparing for 4.1.2.rc1 release
Merge pull request #15269 from arunagw/aa-fixes-8930

rake railties:install:migrations respects the order of railties
Merge pull request #14834 from al2o3cr/issue14155

Correctly alias table names when joining more than once
Revert "Merge pull request #12778 from etehtsea/rake-default-fix"

This reverts commit 38cf00e553bc709cd1f9c4b14992d9730554f757.

Conflicts:
	railties/CHANGELOG.md
Revert "Merge pull request #12778 from etehtsea/rake-default-fix"

This reverts commit 38cf00e553bc709cd1f9c4b14992d9730554f757.

Conflicts:
	railties/CHANGELOG.md
Upgrading Ruby on Rails guide is no longer WIP [ci skip]
Merge pull request #15393 from tonytonyjan/patch-2

Fix documentation
Add missing `:param` option from the docs for Mapper#match [ci skip]
Option discovered by @zackperdue in #14741, implemented in #5581.
pg, keep `hstore` and `json` attributes as `Hash` in @attributes.
The solution presented in this patch is not efficient. We should replace it
in the near future. The following needs to be worked out:
  * Is `@attributes` storing the Ruby or SQL representation?
  * `cacheable_column?` is broken but `hstore` and `json` rely on that behavior

Closes #15369.
[ci skip] Document Rails' shifted semver.
Merge pull request #11896 from nkondratyev/fix_pg_columns_for_distinct

Fixed #columns_for_distinct of postgresql adapter

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
Change the version schema to reflect how deprecations are handled

[ci skip]

We only introduce new deprecations at Minor releases.
Merge pull request #15379 from xuanxu/rational_precision

Fix AS::NumberHelper results with rationals
Conflicts:
	activesupport/CHANGELOG.md
Merge pull request #14195 from robin850/issue-14079

Avoid namespacing routes inside engines
Conflicts:
	railties/CHANGELOG.md

Closes #15376
Merge pull request #15493 from bf4/relax_mail_dep

Relax mail gem constraint from ~> 2.5.4 to ~> 2.5
Merge pull request #15482 from laurocaetano/fix-regression-for-eager-load

Fix regression on eager loading association based on SQL query rather than existing column.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/associations/eager_test.rb
Merge pull request #15482 from laurocaetano/fix-regression-for-eager-load

Fix regression on eager loading association based on SQL query rather than existing column.

Conflicts:
	activerecord/CHANGELOG.md
Remove unused variable