Merge pull request #9397 from senny/9201_duplicate_associations_with_natural_key

test case to prevent duplicated associations with custom PK.
Merge pull request #9356 from senny/988_multiple_actions_for_after_commit

multiple actions for :on option with `after_commit` and `after_rollback`
fix respond_to without blocks not working if one of the blocks is all
Revert "move config.assets.precompile into config/application.rb"

This reverts commit 304f4d4c25ccabdbf97d37dd7a92a54d0b63a9c9.

As it turns out everything should behave as it did and we don't
need to move this configuration option.
Merge pull request #9398 from senny/revert_precompile_config_move

Revert "move config.assets.precompile into config/application.rb"
Do not type cast all the database url values.

We should only type cast when we need to use.

Related to 4b005fb371c2e7af80df7da63be94509b1db038c
Skip connection url test when the machine is using socket configuration.

The connection url parssing don't accept the socket option
Updated doc to clarify about update_all and delete_all

delete_all will call callbacks if depdent option is specified as
:destroy. This behavior is not very clear from the documetation and
hence issue #7832 was raised.

closes #7832
Mention the removal of attr_accessible and attr_protected in the upgrading guide

Point to the Protected Attributes gem to those who want a smoothly
upgrade path before to change to use Strong Parameters.

[ci skip]
Mention the extraction of Active Resource in the upgrading guide

[ci skip]
Merge pull request #9399 from neerajdotname/7832-dependent-option

Updated doc to clarify about update_all and delete_all
Use sprockets-rails 2.0.0.rc3 in new apps
remove AR auto-explain (config.auto_explain_threshold_in_seconds)

We discussed that the auto explain feature is rarely used.
This PR removes only the automatic explain. You can still display
the explain output for any given relation using `ActiveRecord::Relation#explain`.

As a side-effect this should also fix the connection problem during
asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie`
forced a connection.
Merge pull request #9400 from senny/remove_auto_explain_threshold_in_seconds

remove config.auto_explain_threshold_in_seconds
Remove `--builder` option from `rails` command

Ability to use a custom builder by passing `--builder` (or `-b`) has
been removed. Consider using application template instead. See this
guide for more detail:
http://guides.rubyonrails.org/rails_application_templates.html
Merge pull request #9401 from sikachu/master-remove-builder-option

Remove `--builder` option from `rails` command
did a pass over the AM changelog [ci skip]
update the example for `after_commit` in the guides.

This is a follow up to #9356.
Merge pull request #9402 from senny/9356_update_guides

update the example for `after_commit` in the guides.
don't apply invalid ordering when preloading hmt associations.

closes #8663.

When preloading a hmt association there two possible scenarios:

1.) preload with 2 queries: first hm association, then hmt with id IN ()
2.) preload with join: hmt association is loaded with a join on the hm association

The bug was happening in scenario 1.) with a normal order clause on the hmt association.
The ordering was also applied when loading the hm association, which resulted in the error.

This patch only applies the ordering the the hm-relation if we are performing a join (2).
Otherwise the order will only appear in the second query (1).