Calls to the application constant have been refactored to use
Rails.application when drawing routes and creating other configurations
on the application.
Creating a class to build the default middleware stack.

A lot of logic for building the default middleware stack is currently
kept in Application class, but this can be encapsulated and made more
modular by being moved to its own class. Also refactored a couple of the
helper methods.
Removing a repetitive comment and refactoring the Application class in
Railties.

The comment on the +env_config+ method is repetitive, likely to get
outdated, and provides no useful information which cannot be gleamed
from the code. I'm therefore removing it. I'm also refactoring the check
for the presence of a secret_token in the configuration.
Merge pull request #10902 from wangjohn/removing_application_singleton_calls

Calls to the application constant have been refactored
Merge pull request #10961 from wangjohn/changing_rails_env_config

Removing a repetitive comment and refactoring the Application class in Railties
load the file rather than evaling
Merge pull request #10968 from wangjohn/refactoring_rails_application_class

Creating a class to build the default middleware stack.
be consistent about parameter types passed to new_constants_in
we only support 1.9+, so just check for a name
Revert "Merge pull request #10961 from wangjohn/changing_rails_env_config"

This reverts commit 7098d6c9ab28931acc9562a00037567609f9e529, reversing
changes made to 9ec2e2ee91568af24e09760a6de2890b89c33f56.
This make some tests fail /cc @wangjohn
Removing a repetitive comment and removing a deprecation warning.

The comment on the +env_config+ method is repetitive, likely to get
outdated, and provides no useful information which cannot be gleamed
from the code. I'm therefore removing it. I'm also refactoring the check
for the presence of a secret_token in the configuration.
Merge pull request #10986 from wangjohn/changing_rails_env_config

Removing a repetitive comment and a deprecation warning.
`CollectionProxy#include?` returns `true` and `false` as documented.
Merge pull request #10987 from senny/10979_association_include_returns_true

`CollectionProxy#include?` returns `true` and `false` as documented.
Add `respond_with` `location` option to the docs
Merge pull request #10988 from tute/master

Add respond_with location option to docs Edit
It takes 4 spaces or some backticks to have this code displayed as code in the changelog.
Fix formatting of my name in the changelog, and given Aaron credit for b483a0d2a75b
Merge pull request #10998 from Empact/tidy-changelog

Fix some activerecord changelog code to be displayed properly as code [ci skip]
do not load all child records for inverse case

currently `post.comments.find(Comment.first.id)` would load all
comments for the given post to set the inverse association.

This has a huge performance penalty. Because if post has 100k
records and all these 100k records would be loaded in memory
even though the comment id was supplied.

Fix is to use in-memory records only if loaded? is true. Otherwise
load the records using full sql.

Fixes #10509