Merge pull request #11020 from fredwu/master-activemodel-inclusion-chain-fix-iii

ActiveModel::Model inclusion chain backward compatibility
Fix BacktraceCleaner#noise for multiple silencers.

The previous implementation of BacktraceSilencer#noise did not
work correctly if more than one silencer was configured --
specifically, it would only return noise which was matched by all
silencers.

The new implementation is such that anything that has been matched by
silencers is removed from the backtrace using Array#- (array
difference), ie. we now return all elements within a backtrace that
have been matched by any silencer (and are thus removed by #silence).

Fixes #11030.
Don't remove trailing slash from PATH_INFO for mounted apps

Previously when app was mounted as following:

    class Foo
      def call(env)
        [200, {}, [env['PATH_INFO']]]
      end
    end

    RackMountRailsBug::Application.routes.draw do
      mount RackTest.new => "/foo"
    end

trailing slash was removed from PATH_INFO. For example requesting

    GET /foo/bar/

on routes defined above would result in a response containing "/foo/bar"
instead of "/foo/bar/".

This commit fixes the issue.

(closes #3215)

Conflicts:
	actionpack/CHANGELOG.md
Revert "Don't remove trailing slash from PATH_INFO for mounted apps"

This should not be treated as a bug fix, because the behavior was
present in Rails for quite some time and some people may rely on it.

This reverts commit 1193a2738dc751cedcd6155076d68c9851680317.
Merge pull request #11038 from mjtko/backport/fix-11030-to-4-0-stable

(Backport #11030 to 4-0-stable) Fix BacktraceCleaner#noise for multiple silencers
Update the feedback instructions [ci skip]

Since docrails as moved from lifo/docrails to rails/docrails we have
to ask for commit rights or submit patches directly to the rails
repository
Merge pull request #11041 from robin850/4-0-stable

Backport #11033 to 4-0-stable
Merge pull request #11040 from satococoa/fix-create_join_table-document

Fix documents for create_join_table [ci skip]
Merge pull request #11050 from robin850/remove-rails-test-mention

Remove code related to the rails test command [ci skip]
Change a way ActiveRecord's config is prepared for rake tasks

In commit d1d7c86d0 I moved setting migrations paths into activerecord's
railtie to remove Rails dependency on databases.rake. However, it
introduced a regression, ENGINE_PATH was not available at the moment, so
engine's migrations where not added properly to paths. Fix was added
at 97a4a771, but it changes a way things work from using ENGINE_PATH to
APP_RAKEFILE. Additionally, the config runs when the code loads, while
previously it ran in the db:load_config rake task

In order to make it more in pair with original version this commit
changes the config to run only on load_config task. This code uses the
fact that defining a task in rake does not overwrite, but only appends.

It also allows to get back to checking for ENGINE_PATH
Setup env and seed_loaded for DatabaseTasks outside load_config

Those vars can be used in tasks, which not call load_config.
Merge pull request #10971 from dtaniwaki/escape_link_to_unless

Always escape the result of link_to_unless method
Add CHANGELOG entry for #10971

[ci skip]
Fix shorthand routes where controller and action are in the scope

Merge `:action` from routing scope and assign endpoint if both `:controller`
and `:action` are present. The endpoint assignment only occurs if there is
no `:to` present in the options hash so should only affect routes using the
shorthand syntax (i.e. endpoint is inferred from the the path).

Fixes #9856

Backport of 37b4276
Use sass-rails 4.0.0 in new apps
Merge pull request #11095 from vipulnsward/rails_4_docs

We are now rails 4
Merge pull request #11096 from akalyaev/remove-unnecessary-mapping

removed unnecessary mapping for on options
Merge branch 'error-explanation'

Closes #11077 [ci skip]
Merge pull request #11105 from mariozig/correct-documentation

Fix typo in docs. HABTM associations should use a pluralized name [ci skip]
fix to remove warning on postgres adapter test.

Warning was: "/vagrant/rails/activerecord/test/cases/adapters/postgresql/uuid_test.rb:63:
warning: ambiguous first argument; put parentheses or even spaces"