Merge pull request #14965 from eric-chahin/issue_14824

Fixed the inferred table name of a HABTM auxiliar

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
Test with ruby-head to make @tenderlove happy

Conflicts:
	.travis.yml
Using released sprockets
Copy-edit at the CHANGELOGS [ci skip]
Merge pull request #14544 from jefflai2/named_scope_sti

Fixes Issue #13466.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/scoping/named.rb
Merge pull request #10887 from sakuro/deep_transform_keys_in_nested_arrays

Hash#deep_*_keys(!) recurse into nested arrays.

Conflicts:
	activesupport/CHANGELOG.md

Conflicts:
	activesupport/CHANGELOG.md
Only make deeply nested routes shallow when parent is shallow

Since `:shallow` may be set at any point in the resource nesting we should
only make the new and collection routes shallow when the parent is shallow.

This is a bit of a hack but until the mapper is refactored to an object graph
instead of a hash of merged values it's the best we can do.

Fixes #14684.

(cherry picked from commit e10f26f9e90f2fe6c4cd18f70c1e559f2250da56)

Conflicts:
	actionpack/CHANGELOG.md
Revert "Only make deeply nested routes shallow when parent is shallow"

This reverts commit d1ef6c2ed85b0c3c945b9c0f1385f6f3561849cc.
build fix, use lambda syntax that ruby 1.9.3 understands.

(cherry picked from commit b452e4a39b8a4a8880825cc1868df656ede7d609)
Revert "Merge pull request #14544 from jefflai2/named_scope_sti"

This reverts commit 807ee0ac67fe094a4439fdf616c5a5bdbb3bd050.

Conflicts:
	activerecord/test/models/comment.rb

This change break integration with activerecord-deprecated_finders so
I'm reverting until we find a way to make it work with this gem.
Don't recurse infinitely when calling non-existent method on super
fix test from 7537057888d2d63c3b6c2019d5828bc445fbd6c9
Merge pull request #14986 from dlangevin/trailing-slash-url-generation

Fixes URL generation with trailing_slash: true

Conflicts:
	actionpack/lib/action_dispatch/http/url.rb

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_dispatch/http/url.rb

Conflicts:
	actionpack/CHANGELOG.md
Merge pull request #9083 from bronson/patch-1

avoid using alias in generators
Add FIXME note about the thor bug
Escape user input before showing in the page.

This is not a security issue since this page is not present in
production and user have to type something in the field but is better to
escape the input.