FileHandler should not be called for files outside the root

FileHandler#matches? should return false for files that are outside the
"root" path.
Use include_blank value as option label

Update select_tag to reflect documentation and behave the same as form builder select. If the value of include_blank is not boolean true, use that value as the option label.
Fix Relation.rewhere to work with Range values
Show the user’s application in the source window and select the correct trace list, closes #17312
Raises ArgumentError when try to define a scope without a callable

This changes the actual exception `NoMethodError: undefined method `call'
for #<ActiveRecord::Relation []>` to a `ArgumentError` when try to define
a scope without a callable.
AR Migrations Guide#Foreign Keys: fix wrong table

[skip ci]
Merge pull request #17381 from jonatack/patch-8

AR Migrations Guide#Foreign Keys: fix wrong table
Improved try documentation [ci skip]

- better `if` example
- Added chaining example to the try method description
- Documented the `respond_to?` check to the try method description
- Clearer wording to explain that argument error is raised on argument mismatch to responding method, rather than to non-responding method (which is handled without exception by `try`)
- `.any?` is more precise than `! .blank?`
 - Don't need to use `try` on `children` as (for regular associations) they will always be a collection or array that responds to `first`
- Fix typos/grammar
Include return value in examples added in #17378 [ci skip]
Use type column first in multi-column indexes

`add_reference` can very helpfully add a multi-column index when you use
it to add a polymorphic reference. However, the first column in the
index is the `id` column, which is less than ideal.

The [PostgreSQL docs][1] say:
> A multicolumn B-tree index can be used with query conditions that
> involve any subset of the index's columns, but the index is most
> efficient when there are constraints on the leading (leftmost)
> columns.

The [MySQL docs][2] say:
> MySQL can use multiple-column indexes for queries that test all the
> columns in the index, or queries that test just the first column, the
> first two columns, the first three columns, and so on. If you specify
> the columns in the right order in the index definition, a single
> composite index can speed up several kinds of queries on the same
> table.

In a polymorphic relationship, the type column is much more likely to be
useful as the first column in an index than the id column. That is, I'm
more likely to query on type without an id than I am to query on id
without a type.

[1]: http://www.postgresql.org/docs/9.3/static/indexes-multicolumn.html
[2]: http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html
Revert a change made to the example in 1ac4525

@carlosantoniodasilva pointed out that when `@person` is nil then this would blow up when you ended up calling `#first`on `nil`.

> "there’s no way to break a try chain when you enter it :D"

[ci skip]
Fix typo in "Active Record Basics" guide. [ci skip]
Merge pull request #17385 from nakadai/patch-1

Fix typo in "Active Record Basics" guide. [ci skip]
Avoid creating unneeded Hash instance and calling slow Hash#fetch
The code was not up-to-date
Avoid creating range objects (take II)
Reduce object allocation
Reduce object allocation
instance_eval is evil
fixes circularity check in dependencies

The check for circular loading should depend on a stack of files being
loaded at the moment, rather than the collection of loaded files.

This showed up indirectly in #16468, where a misspelled helper would
incorrectly result in a circularity error message.

References #16468