Accept belongs_to assoc. keys in ActiveRecord queries

Allows you to specify the model association key in a belongs_to
relationship instead of the foreign key.

The following queries are now equivalent:

Post.where(:author_id => Author.first)
Post.where(:author => Author.first)

PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure)
PriceEstimate.where(:estimate_of => treasure)
Merge pull request #7273 from beerlington/foreign_key_model_queries

Convert model name to foreign key in queries
Fix nested association references

Previously the reflection would be looked up on the wrong class. However
the test passed because the examples referred back to themselves.
Refactor to remove some duplication
Pass in the model class rather than engine

In some circumstances engine was Arel::Table.engine which for separate
reasons was an ActiveRecord::Model::DeprecationProxy, which caused a
deprecation warning.

In any case, we want the actual model class here, since we want to use
it to infer information about associations.
change app/plugin generators to be more SCM agnostic

Users of other SCM's can now generate rails
apps that will add the "empty" directories to source control,
but will not have a useless .gitignore or mis-named .gitkeep
files.

* Change `rails new` and `rails plugin new` generators to name
  the `.gitkeep` as `.keep` in a more SCM-agnostic way.

* Change `--skip-git` option to only skip the `.gitignore` file
  and still generate the `.keep` files.

* Add `--skip-keeps` option to skip the `.keep` files.

It closes #2800.
Merge pull request #7614 from frodsan/scm_agnostic

add --skip-ignore and --skip-keeps options to generators.
update ConnectionAdaptar::Column#type_cast_code to be compatible with 3.2 branch
Merge pull request #7623 from tchandy/master

update ConnectionAdapter::Column#type_cast_code to be compatible with rails 3.2 branch
extend ActiveSupport::Deprecation with self, allow other objects to extend/include it also.

test local deprecation

deprecator object

Test ActiveSupport::Deprecation when included
Change ActiveSupport::Deprecation to class.

ActiveSupport::Deprecation is now a class rather than a module. You can
get instance of ActiveSupport::Deprecation calling #instance method.

  ActiveSupport::Deprecation.instance

But when you need to get new object od ActiveSupport::Deprecation you
need to just call #new.

  @instance = ActiveSupport::Deprecation.new

Since you can create a new object, you can change the version and the
name of the library where the deprecator concerned.

  ActiveSupport::Deprecation.new('2.0', 'MyGem')

If you need use another deprecator instance you can select it in the
options of deprecate method.

  deprecate :method, :deprecator => deprecator_instance

Documentation has been updated.
Implement :null_session CSRF protection method

It's further work on CSRF after 245941101b1ea00a9b1af613c20b0ee994a43946.

The :null_session CSRF protection method provide an empty session during
request processing but doesn't reset it completely (as :reset_session
does).
Merge pull request #6348 from LTe/no_global_depreactations

Allow ActiveSupport::Deprecation features to be used by rails applications and library authors
refactor store_accessor
Merge pull request #7524 from al2o3cr/store_boolean

Add boolean type conversion for AR::Store
Copy-edit deprecation relared documentation [ci skip]
Allow passing block to deep_merge and deep_merge!

Hash#merge accepts block that you can use to customize how hash values
are merged. This change makes merge and deep_merge compatible.
Merge pull request #7628 from Pranas/deep_merge_with_block

Allow passing block to deep_merge and deep_merge!
Merge pull request #7616 from lest/null-session-forgery-protection

Implement :null_session CSRF protection method
Build fix for ActionMailer

See

http://travis-ci.org/#!/rails/rails/jobs/2444632