Don't load test env by default
Pass a base relation to build_default_scope when joining

This allows the default scope to be built using the current table alias.
Resolves #12770
Updating select helper doc [ci skip]
Fix misspelling in references docs
Still touch associations when theres no timestamp

Prior to Rails 4.0.4 when touching a object which doesn't have timestamp
attributes (updated_at / updated_on) rails would still touch all
associations. After 73ba2c14cd7d7dfb2d132b18c47ade995401736f it updates
associations but rollsback because `touch` would return nil since
there's no timestamp attribute
Update documentation on group method to indicate it takes an array

The group method also takes an array, however this isn't immediately
clear by reading the source since it delegates this method. If you
trace it back to the AREL building you can see that it does support
an array.

Shoutout to @betovelandia for pointing this out.
Mention required glob param name in match docs for mapper

THe match documentation doesn't mention any requirement of the
parameter name requirement for matches. However, including a
bare glob character without a variable assignment causes a
parse error.
Remove sqlite3 lines from .gitignore if the application is not using sqlite3.
Merge pull request #14447 from Houdini/gitignore

Skip sqlite3 files in .gitignore if no sqlite3 in app
Check if any sqlite files are not included in the gitignore

If the sqlite file name change in future version we this regexp should
catch
- Rename `increment_or_decrement` to an apt `set_cache_value` since it actually doesn't increment/decrement in localstore.
Fix date_select option overwriting html classes

with_css_classes: true option overwrites other html classes.
Concatenate day month and year classes rather than overwriting.
Merge pull request #14468 from izoomi/date_select_helper

Fix date_select with_css_classes: true option overwriting other html classes
Merge pull request #14466 from vipulnsward/rename-cache-method

Rename method and stop passing unused arguements.
use ARel factory methods for building AST nodes

This abstracts us from the actual construction of the nodes
do not rely on method_missing hitting arel

arel methods are not supposed to be public API for ActiveRecord
synchronize changelogs and 4.1 release notes. [ci skip]

Conflicts:
	actionpack/CHANGELOG.md
	activerecord/CHANGELOG.md
	activesupport/CHANGELOG.md
	railties/CHANGELOG.md
update comments to reflect that options support is not available
Merge pull request #14477 from fcheung/options_test_method

Support the options methods in tests
Fix Generation of proper migration when
  ActiveRecord::Base.pluralize_table_names = false.

  Previously, generation a migration like this:

      rails g migration add_column_name_to_user name

  would not generating the correct table name.

Fixes #13426.