Merge pull request #6818 from frodsan/add_nodoc_instancemethod

add :nodoc: to AM::AttributeMethods#instance_method_already_implemented?...
add description to ActiveModel::MissingAttributeError [ci skip]
Set the hash value directly instead of using merge!
Improve the derivation of HABTM assocation join table names

Improve the derivation of HABTM join table name to take account of nesting.
It now takes the table names of the two models, sorts them lexically and
then joins them, stripping any common prefix from the second table name.

Some examples:

  Top level models
  (Category <=> Product)
  Old: categories_products
  New: categories_products

  Top level models with a global table_name_prefix
  (Category <=> Product)
  Old: site_categories_products
  New: site_categories_products

  Nested models in a module without a table_name_prefix method
  (Admin::Category <=> Admin::Product)
  Old: categories_products
  New: categories_products

  Nested models in a module with a table_name_prefix method
  (Admin::Category <=> Admin::Product)
  Old: categories_products
  New: admin_categories_products

  Nested models in a parent model
  (Catalog::Category <=> Catalog::Product)
  Old: categories_products
  New: catalog_categories_products

  Nested models in different parent models
  (Catalog::Category <=> Content::Page)
  Old: categories_pages
  New: catalog_categories_content_pages

Also as part of this commit the validity checks for HABTM assocations have
been moved to ActiveRecord::Reflection One side effect of this is to move when
the exceptions are raised from the point of declaration to when the association
is built. This is consistant with other association validity checks.
update ActiveModel::Callbacks documentation [ci skip]
Don't paramify ActionDispatch::Http::UploadedFile in tests

To test uploading a file without using fixture_file_upload, a posted
ActionDispatch::Http::UploadedFile should not be paramified (just like
Rack::Test::UploadedFile).
(Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't
share the same API, tempfile is not accessible on
Rack::Test::UploadedFile as discussed in
https://github.com/brynary/rack-test/issues/30)
It's AR::Reflection not AR::Relation
disallow mutating a relation once loaded
Add some coverage for AR serialization with serializable_hash

ActiveRecord json/xml serialization should use as base
serializable_hash, provided by ActiveModel. Add some more coverage
around options :only and :except for both json and xml serialization.
Fix serializable_hash with xml generation and default :except option

When generating xml with a custom implementation of serializable_hash,
if using the :except option, it was being overriden by the default AR
implementation that attempts to ignore the inheritance column from STI
automatically. So, if you have an implementation like this:

    def serializable_hash(options={})
      super({ except: %w(some_attr) }.merge!(options))
    end

The :except option was correctly being used for :json generation, but
not for :xml, because the options hash already contained the :except
key with the inheritance column, thus overriding the customization.

This commit fixes this problem by removing the :except logic from the
xml serializer, that happened before calling serializable_hash. Since
serializable_hash also does the same check for inheritance column, this
logic was duplicated in both places, thus it's safe to remove it from
xml serializer (see ActiveRecord::Serialization#serializable_hash).

This is an attempt to solve issue #2498, that claims for a
"Single transformation API for both xml and json representations".
ActiveRecord#pluck now accepts multiple columns
Refactor pluck with multiple columns

Ensure it works with mix of symbols and strings, and with a select
clause possibly containing more than one column.

Also remove support for pluck with an array of columns, in favor of
passing the list of attributes:

    Model.pluck(:a, :b)

See comments: https://github.com/rails/rails/pull/6500#issuecomment-6030292
Add changelog entry and guide updates for pluck with multiple columns
Merge branch 'pluck-multiple-columns'

Allow ActiveRecord::Relation#pluck to accept multiple columns. Returns an
array of arrays containing the type casted values:

    Person.pluck(:id, :name)
    # SELECT people.id, people.name FROM people
    # [[1, 'David'], [2, 'Jeremy'], [3, 'Jose']]

Closes #6500
Fix changelog typo [ci skip]
made dynamic finders alias_attribute aware

previously dynamic finders only worked in combination with the actual
column name and not its alias defined with #alias_attribute
Merge pull request #6800 from mschneider/dynamic_finders_for_aliased_attributes

Dynamic finders for aliased attributes
copy edit the assets guide[ci skip]
fixes a few mistakes in api docs [ci skip]
Merge branch 'master' of github.com:lifo/docrails