Merge pull request #14539 from lparedes/master

Do not overwrite selected and disabled attributes
Conflicts:
	actionpack/lib/action_view/helpers/form_options_helper.rb
Fix polymorphic preloads on NOT NULL _type columns.

Defer to Association#klass instead of having a custom/duplicate code.
Simplify Preloader#grouped_records code.

The new method relies on AR::Associations::Association knowing about both reflection and a model class.

AR::Base#association now raises a descriptive error when trying to access non-existent associations. Previously it would blow up with a confusing NoMethodError: undefined method `association_class' for nil:NilClass.
Merge pull request #14580 from thedarkone/4-0-stable-backport-14532

Backport #14532 into 4-0-stable
Merge pull request #14572 from laurocaetano/with_options_and_scope

Fix error when using `with_options` with lambda.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/associations/has_many_associations_test.rb
Merge pull request #14562 from jefflai2/collection_proxy

CollectionProxy uses the arel of its association's scope.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/relations_test.rb
Stray nodoc causes rest of file not parsed [ci skip]
Merge pull request #14605 from laurocaetano/fix_nodoc_on_collection_proxy

Backport to fix wrong nodoc on collection proxy.
Merge pull request #11650 from prathamesh-sonpatki/rename

Renamed private methods _create_record and _update_record

Conflicts:
	activerecord/lib/active_record/persistence.rb
	activerecord/lib/active_record/relation.rb
	activerecord/test/cases/associations/belongs_to_associations_test.rb
Fix the test defining the models in the right place

Conflicts:
	activerecord/test/cases/associations/belongs_to_associations_test.rb
	activerecord/test/schema/schema.rb
Merge pull request #14631 from laurocaetano/fix_count_with_order

Ignore order when doing count.