Merge branch 'master' into adequaterecord

* master: (32 commits)
  Typo fix for unscope
  Use the reference for the mime type to get the format
  Preparing for 4.1.0.beta2 release
  Correctly escape PostgreSQL arrays.
  Escape format, negative_format and units options of number helpers
  Sync 4.1 release notes with changes since 7f648bc7 [ci skip]
  Update upgrading guide regarding `render :text`
  Add `#no_content_type` attribute to `AD::Response`
  Add missing CHANGELOG entry to Action View
  Update guides for new rendering options
  Cleanup `ActionController::Rendering`
  Fix a fragile test on `action_view/render`
  Introduce `render :html` for render HTML string
  Introduce `render :plain` for render plain text
  Update hash format for render_text_test
  Introduce `render :body` for render raw content
  Don't use `# =>` when it is not the expression values
  Fix the column name [ci skip]
  Document the default scopes change on the release notes, CHANGELOG and upgrating guides
  Move changelog entry to the top, fix examples indent [ci skip]
  ...
[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
Merge branch 'master' into adequaterecord

* master: (55 commits)
  [ci skip] Move association class method notes
  extract common code in `uuid_test.rb`.
  move PostgreSQL UUID tests from `datatype_test.rb` to `uuid_test.rb`.
  [ci skip] remove guide section on models in migrations
  test case for custom PostgreSQL enum type.
  Remove inclusion of rubysl gem for rbx on generated Gemfile
  let `insert_record` actuall save the object.
  [skip ci] Fix test name typo in app generator tests.
  travis s/2.1.0/2.1.1
  Bump version of bcrypt gem
  Skip test_migrate_revert_add_index_with_name if databases do not allow to create duplicate indexes on the same columns
  Optimize getting started guide images, and use png instead of jpg
  :scissors: [ci skip]
  Point master changelogs to 4-1-stable branch
  Add missing parantheses in index_exists?
  `ActionDispatch::Head` was replaced by `Rack::Head`. Closes #14191.
  [skip ci] Standardized punctuation.
  [skip ci] Fix typo in link_to :method option description
  refactor, with_locale is not needed because I18n is mocked.
  Fix ActionView label translation for more than 10 nested elements
  ...
Merge branch 'master' into adequaterecord

* master:
  modify model generator warning message. refs [#174c9f0]
  Replace "data store" with database [ci skip]
  Return a hash rather than array from fetch_multi
  Fix concerning module reference [ci skip]
  Fixes docs typo in nested resource path helpers [skip ci]
  Fix some validators when used on model instance
  Pass strings to demodulize method
  pass strings to the underscore method
  speed up `underscore` in cases that don't need to do anything
  pass the class name to `tableize`
  [ci skip] Update list of files extensions in rake notes guide
  Fix controller test not resetting @_url_options
we can't cache when the arguments are a hash
Merge branch 'master' into adequaterecord

* master: (108 commits)
  make tests pass on Ruby 2.2
  Use Sqlite3 adapter in examples
  use the body proxy to freeze headers
  just ask the response for the commit status, we do not need to ask the jar
  only write the jar if the response isn't committed
  Fix a grammatical error in the i18n guide [ci skip]
  use method_defined? to check whether or not a method is defined
  Enhance docs for update_attribute [ci-skip]
  Change usec to 0 on tests that compare seconds
  Unit test for mysql quote time usec
  Changelog entry for mysql56 microseconds
  Test microsecond on mysql 5.6
  MySQL 5.6 and later supports microsecond precision in datetime.
  [ci skip] Add documentation for original_fullpath.
  Remove mocking on save, when not necessary
  comment why we are modifying global state. [ci skip]
  `change_table` supports `citext`. Follow up to #12523.
  Removed unnecessary command "application"
  register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester]
  Fixes STI when 2+ levels deep.
  ...
`where` automatically uses bind values now
Merge branch 'master' into adequaterecord

* master:
  passing an instance of an AR object to `find` is deprecated
  passing an ActiveRecord object to `exists?` is deprecated.
add the deprecation to adequate record too
Merge branch 'master' into adequaterecord

* master: (96 commits)
  clarify CHANGELOG [ci skip].
  Fix Generation of proper migration when   ActiveRecord::Base.pluralize_table_names = false.
  update comments to reflect that options support is not available
  synchronize changelogs and 4.1 release notes. [ci skip]
  do not rely on method_missing hitting arel
  use ARel factory methods for building AST nodes
  Fix date_select option overwriting html classes
  - Rename `increment_or_decrement` to an apt `set_cache_value` since it actually doesn't increment/decrement in localstore.
  Check if any sqlite files are not included in the gitignore
  Remove sqlite3 lines from .gitignore if the application is not using sqlite3.
  Adding active_model in Rails::Info
  Clean up tables after each test.
  Swapped parameters of assert_equal in assert_select
  Update test helper to use latest Digestor API
  Digestor should just rely on the finder to know about the format and the variant -- trying to pass it back in makes a mess of things (oh, and doesnt work)
  Log the full path, including variant, that the digestor is trying to find
  Fix for digestor to consider variants for partials -- this still needs more testing!!
  fix log_tags request object grammar
  Extract with_example_table into helper method.
  test for structure:dump without schema information table. refs eafec46
  ...

Conflicts:
	activerecord/test/cases/relation/where_chain_test.rb
Refactor test to use DdlHelper.

Follow-Up to https://github.com/rails/rails/pull/14400

This ensures that all tables are removed after each test and thereby
allowing us to run the tests in a random order.
Require yaml explicitly
Merge pull request #14474 from tgxworld/table_cleanup_after_each_test

Refactor test to use DdlHelper.
No need to call to_sym

It is already called inside type_to_sql method.
fix bug on non empty defaults for pg array columns

fixes #10613
Merge pull request #14528 from planas/patch-1

Require yaml explicitly on #database_configuration
fix mysql builds
Do not overwrite selected and disabled attributes
Fix polymorphic preloads on NOT NULL _type columns.

Defer to Association#klass instead of having a custom/duplicate code.
Merge pull request #14509 from lukesteensen/pg-array-defaults

remove calls to sql_type on pg columns