[Active Record] Renamed private methods create_record and update_record

 This is to ensure that they are not accidentally called by the app code.
 They are renamed to _create_record and _update_record respectively.
 Closes #11645
CollectionProxy uses the arel of its association's scope.

CollectionProxy should be able to reuse the behavior (methods) of its parent class,
but with its own state. This change allows CollectionProxy to use the arel object
corresponding to its association's scope.
Fix error when using `with_options` with lambda.

It was causing error when using `with_options` passing a lambda as its
last argument.

    class User < ActiveRecord::Base
      with_options dependent: :destroy do |assoc|
        assoc.has_many :profiles, -> { where(active: true) }
      end
    end

It was happening because the `option_merger` was taking the last
argument and checking if it was a Hash. This breaks the HasMany usage,
because its last argument can be a Hash or a Proc.

As the behavior described in this test:
https://github.com/rails/rails/blob/master/activesupport/test/option_merger_test.rb#L69
the method will only accept the lambda, this way it will keep the expected behavior. See 9eaa0a34
Improve error message for guides:generate:kindle

With `kindlegen` missing from the PATH, the task
keeps suggesting to `gem install kindlerb`.
This change provides a more meaningful error
message for guides:generate:kindle.
Merge pull request #14590 from czak/improved_kindlerb_error_message

Improve error message for guides:generate:kindle
Merge pull request #14572 from laurocaetano/with_options_and_scope

Fix error when using `with_options` with lambda.

Conflicts:
	activerecord/CHANGELOG.md
Block a few default Class methods as scope name.

Add tests to make sure scopes cannot be create with names such as:
private, protected, public.
Make sure enum values don't collide with those methods too.
Merge pull request #14582 from arthurnn/blacklist_ruby_methods

Blacklist ruby keywords for scopes
Prevent state leak in test.

This will allow us to run the tests in random order.
PostgreSQL and SQLite, remove varchar limit. [Vladimir Sazhin & Toms Mikoss & Yves Senn]

There is no reason for the PG adapter to have a default limit of 255 on :string
columns. See this snippet from the PG docs:

    Tip: There is no performance difference among these three types, apart
    from increased storage space when using the blank-padded type, and a
    few extra CPU cycles to check the length when storing into a
    length-constrained column. While character(n) has performance
    advantages in some other database systems, there is no such advantage
    in PostgreSQL; in fact character(n) is usually the slowest of the
    three because of its additional storage costs. In most situations text
    or character varying should be used instead.
test, show current adapter behavior for `add_column limit: nil`.

This is an illustration of https://github.com/rails/rails/pull/13435#issuecomment-33789752
Removing the limit from the PG and SQLite adapter solves the issue.
MySQL is still affected by the issue.
Merge pull request #14593 from tgxworld/fix_postgresql_schema_test_random_order

Prevent state leak in test.
Ensure we supply Kernel#y for 1.9 too

In 1.9, it doesn't live in its own file, so we'll have to define it
ourselves.

Check RUBY_VERSION, instead of rescuing the require, because we want
this to break if `psych/y` moves in a future Ruby release.
Merge pull request #14597 from matthewd/kernel_y_for_1_9_option_1

Ensure we supply Kernel#y for 1.9 too
Active support instead of ActiveSupport::Deprecation.silence we can use assert_deprecated
Merge pull request #14598 from rajcybage/assert_dprecated_for_as_test_case

Active support instead of ActiveSupport::Deprecation.silence we can use assert_deprecated
Remove unused variable
add missing parentheses to validates_with documentation [skip ci]
Merge pull request #14599 from spagalloco/patch-1

add missing parentheses to validates_with documentation [skip ci]
Merge pull request #14562 from jefflai2/collection_proxy

CollectionProxy uses the arel of its association's scope.

Conflicts:
	activerecord/CHANGELOG.md