Merge pull request #12845 from amatsuda/should_ar_depend_on_rails

Refer to Rails.env from AR only when Rails is defined
Ruby's new Hash syntax applied in actionmailer
Merge pull request #12884 from akshay-vishnoi/refactor

Ruby's new Hash syntax applied in actionmailer
Merge pull request #12832 from vipulnsward/move_schema_creation

Move `SchemaCreation` to its own file instead of `AbstractAdapter`.
Clean up `require ‘active_support/deprecation’` and remove circular require
Merge pull request #12861 from route/missed_require_for_module

Clean up `require ‘active_support/deprecation’` and remove circular require
#presence used
Merge pull request #12886 from akshay-vishnoi/refactor

#presence used
Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method.
class methods moved to already defined class<<self block
Merge pull request #12890 from akshay-vishnoi/refactor

class methods moved to already defined class<<self block
Merge pull request #12891 from javan/to-param

Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method
Used Yield instead of block.call
Merge pull request #12889 from kuldeepaggarwal/speed_ups

Used Yield instead of block.call
avoiding next statements
Merge pull request #12892 from akshay-vishnoi/refactor

avoiding next statements
Addendum to #12891
* Fix incorrectly named tests
* Restore Object#to_param behavior
* Ensure param is derived from a squished and truncated string
Merge pull request #12819 from vipulnsward/also_dup_column_types

Also dup `column_types` in AR::Result `initialize_copy`
Merge pull request #12893 from javan/to-param-addendum

Addendum to #12891
Fix that eager loading of polymorphic associations did not work with association empty?/any? predicates any more (there is still a problem when select is applied to a relation, or if you try association#exists? -- but its easier to work around)