Merge pull request #15012 from schneems/schneems/headers-key

HTTP::Headers#key? correctly converts
Merge branch 'rm-trasaction-fix-13166'

Conflicts:
	activerecord/CHANGELOG.md

Backport of #13166
Merge pull request #12746 from coreyward/master

Fix Hash#deep_merge bug and improve documentation — resolves #12738

Conflicts:
	activesupport/lib/active_support/core_ext/hash/deep_merge.rb
	activesupport/test/core_ext/hash_ext_test.rb
Dup the changed_attributes otherwise we could lose them
Fixed HABTM's CollectionAssociation size

HABTM should not include new records as part of #count_records as new records are already counted.

This addresses #14914.
Merge pull request #14995 from fredwu/habtm_relation_size_calculation_fix-4-0-stable

Habtm relation size calculation fix for 4.0 branch
Merge pull request #15042 from arthurnn/revert_dirty_transactions

Reverts dirty track restore on transactions rollback
Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #15044 from zzak/travis_ruby_too_won

Only need MINOR version level to test Ruby 2.1.x on Travis
Conflicts:
	.travis.yml
use fnmatch to test for case insensitive file systems

this is due to:

  https://bugs.ruby-lang.org/issues/5994
feature detect for FNM_EXTGLOB for older Ruby. Fixes #15053
ActionDispatch::Http::URL.normalize_port should not strip port for protocol relative URL.

(cherry picked from commit be93d94ef28421a2dbcd6ed870b454433a5a0a72)
Always use the provided port for protocol relative urls

There may be situations where you need to tunnel SSL connections over
port 80 so we shouldn't remove it if it has been explicitly provided.

(cherry picked from commit 2378f69e69f98460f426d2c4e0fbb967b4fa5ddf)

Conflicts:
	actionpack/CHANGELOG.md
pg, `change_column_default` accepts `[]`. Closes #11586.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
	activerecord/test/cases/adapters/postgresql/array_test.rb
`stored_attributes` need to be specific to a subclass.

Currently they are all stored globally in the same `Hash`.
This commit forces the creation of a per-class variable if necessary.

The behavior was exposed through the following test-case:

```
  1) Failure:
StoreTest#test_all_stored_attributes_are_returned [/Users/senny/Projects/rails/activerecord/test/cases/store_test.rb:151]:
--- expected
+++ actual
@@ -1 +1 @@
-[:color, :homepage, :favorite_food]
+[:resolution, :color, :homepage, :favorite_food]
```

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/store_test.rb
Merge pull request #14833 from jyao6/attribute_inheritance

Fixed Attribute Inheritance Issue

Conflicts:
	activerecord/CHANGELOG.md
Merge pull request #14546 from eileencodes/fix_delete_all_to_not_use_IN_statement

Fix delete all to not produce sql in statement
Conflicts:
	activerecord/test/cases/associations/has_many_associations_test.rb

Merge pull request #14727 from robin850/patch-17

Add a changelog entry for #14546 [ci skip]

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/associations/collection_association.rb
	activerecord/test/cases/associations/has_many_associations_test.rb
	activerecord/test/cases/test_case.rb
Merge pull request #15078 from nbudin/fix_merger_filter_binds_comparison_master

Make filter_binds filter out symbols that are equal to strings

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/relation/merger.rb
	activerecord/test/cases/relation/merging_test.rb
Add missing requires for require 'action_dispatch/routing'

(cherry picked from commit ee8dc39ebe88b294496d731150a9fdca35d9478c)
Merge pull request #15118 from khelben/head_with_status_action_stack_level_too_deep

fixes stack level too deep exception on action named 'status' rendering 'head :ok'

Conflicts:
	actionpack/CHANGELOG.md
Feature detect based on Ruby version.

I didn't want to do this, FNM_EXTGLOB is defined on 2.1.x, but Dir.glob
returns the wrong value on Ruby less than 2.2.0.  Checking for a
case-insensitive FS seems too hard, so just check Ruby version  Checking
for a case-insensitive FS seems too hard, so just check Ruby version.